summaryrefslogtreecommitdiff
path: root/python/qpid/peer.py
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-08-21 15:51:41 +0000
committerGordon Sim <gsim@apache.org>2007-08-21 15:51:41 +0000
commitbb2883b9f5cfad0e028a9849ed91e36418a2d0ff (patch)
tree555686e2e819a875048610d88c2cee8e336b3687 /python/qpid/peer.py
parent955d5ccb544ff4f56d35c40aa8934cbf4dfff14e (diff)
downloadqpid-python-bb2883b9f5cfad0e028a9849ed91e36418a2d0ff.tar.gz
Refresh of transitional xml to more closely reflect latest specification
Initial execution-result support (not yet handled on c++ client) Generation is now all done through the ruby code (it is a little slower at present I'm afraid, will try to speed it up over the next weeks) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/peer.py')
-rw-r--r--python/qpid/peer.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/python/qpid/peer.py b/python/qpid/peer.py
index 6762f774f4..6ad5482f09 100644
--- a/python/qpid/peer.py
+++ b/python/qpid/peer.py
@@ -208,6 +208,8 @@ class Channel:
self.responses.close()
self.completion.close()
self.incoming_completion.reset()
+ for f in self.futures.values():
+ f.put_response(self, reason)
def write(self, frame, content = None):
if self.closed:
@@ -324,7 +326,10 @@ class Channel:
raise ValueError(resp)
elif frame.method.result:
if self.synchronous:
- return future.get_response(timeout=10)
+ fr = future.get_response(timeout=10)
+ if self.closed:
+ raise Closed(self.reason)
+ return fr
else:
return future
elif self.synchronous and not frame.method.response \
@@ -373,7 +378,10 @@ class Future:
def get_response(self, timeout=None):
self.completed.wait(timeout)
- return self.response
+ if self.completed.isSet():
+ return self.response
+ else:
+ return None
def is_complete(self):
return self.completed.isSet()