You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2014/09/07 00:05:50 UTC
svn commit: r1622949 - /qpid/trunk/qpid/python/qpid/peer.py
Author: kwall
Date: Sat Sep 6 22:05:50 2014
New Revision: 1622949
URL: http://svn.apache.org/r1622949
Log:
QPID-6082: [Python Client] 08..091 Explicitly set incoming queue to guard method interleaving
Modified:
qpid/trunk/qpid/python/qpid/peer.py
Modified: qpid/trunk/qpid/python/qpid/peer.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/peer.py?rev=1622949&r1=1622948&r2=1622949&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/peer.py (original)
+++ qpid/trunk/qpid/python/qpid/peer.py Sat Sep 6 22:05:50 2014
@@ -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):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org