summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-08-08 17:11:12 +0000
committerGordon Sim <gsim@apache.org>2007-08-08 17:11:12 +0000
commit5838439eb64e0d812744405a5a2b172e52ab9f61 (patch)
treed28f690f7f180cb6d0ac1c8489a1121f42cd6eed /qpid/python
parent2951630e82015a6be663a9e822e70507629f93c0 (diff)
downloadqpid-python-5838439eb64e0d812744405a5a2b172e52ab9f61.tar.gz
Timeout after waiting for completion that doesn't arrive.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@563945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/peer.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/qpid/python/qpid/peer.py b/qpid/python/qpid/peer.py
index 2861d51165..4a560fca5a 100644
--- a/qpid/python/qpid/peer.py
+++ b/qpid/python/qpid/peer.py
@@ -269,7 +269,7 @@ class Channel:
self.request(frame, self.queue_response, content)
if not frame.method.responses:
- if self.use_execution_layer and type.klass.name != "execution":
+ if self.use_execution_layer and type.is_l4_command():
self.execution_flush()
self.completion.wait()
if self.closed:
@@ -312,11 +312,13 @@ class Channel:
else:
raise ValueError(resp)
elif self.synchronous and not frame.method.response \
- and self.use_execution_layer and frame.method.klass.name != "execution":
+ and self.use_execution_layer and frame.method.is_l4_command():
self.execution_flush()
- self.completion.wait()
+ completed = self.completion.wait(timeout=10)
if self.closed:
raise Closed(self.reason)
+ if not completed:
+ raise close("Timed-out waiting for completion")
except QueueClosed, e:
if self.closed: