diff options
author | Keith Wall <kwall@apache.org> | 2014-09-06 22:05:50 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2014-09-06 22:05:50 +0000 |
commit | 9ca387a6c4d22a6a476a494ee02f0e2d8a341589 (patch) | |
tree | 0546da7524516b8444202049b4029e97489e9a93 /python | |
parent | 5ab09164166be8813ab32e388e08c64ef122030a (diff) | |
download | qpid-python-9ca387a6c4d22a6a476a494ee02f0e2d8a341589.tar.gz |
QPID-6082: [Python Client] 08..091 Explicitly set incoming queue to guard method interleaving
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1622949 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r-- | python/qpid/peer.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/qpid/peer.py b/python/qpid/peer.py index 40571780f1..851435cd69 100644 --- a/python/qpid/peer.py +++ b/python/qpid/peer.py @@ -183,6 +183,7 @@ class Channel: self.incoming = Queue(0) self.responses = Queue(0) self.queue = None + self.content_queue = None self._closed = False self.reason = None @@ -233,6 +234,11 @@ class Channel: def receive(self, frame, work): if isinstance(frame, Method): + if frame.method_type.content: + if frame.method.response: + self.content_queue = self.responses + else: + self.content_queue = self.incoming if frame.method.response: self.queue = self.responses else: @@ -246,6 +252,8 @@ class Channel: if frame.method_type.content: self.queue = self.responses return + elif isinstance(frame, Body) or isinstance(frame, Header): + self.queue = self.content_queue self.queue.put(frame) def queue_response(self, channel, frame): |