diff options
author | Gordon Sim <gsim@apache.org> | 2007-08-08 17:11:12 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-08-08 17:11:12 +0000 |
commit | 6ce5c06fc48c0216e32ff45624ac00152db62466 (patch) | |
tree | b73a9dbf152fd2032fd0e8330cbb49ac483a8bef /python/qpid/peer.py | |
parent | c949d94701c7e559eaa1b915691f73918d43317e (diff) | |
download | qpid-python-6ce5c06fc48c0216e32ff45624ac00152db62466.tar.gz |
Timeout after waiting for completion that doesn't arrive.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@563945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/peer.py')
-rw-r--r-- | python/qpid/peer.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/python/qpid/peer.py b/python/qpid/peer.py index 2861d51165..4a560fca5a 100644 --- a/python/qpid/peer.py +++ b/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: |