qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1683708 - /qpid/trunk/qpid/python/qpid/client.py
Date Fri, 05 Jun 2015 10:51:23 GMT
Author: orudyy
Date: Fri Jun  5 10:51:23 2015
New Revision: 1683708

URL: http://svn.apache.org/r1683708
Log:
QPID-6567: [Python Client 0-8..0-91] send flow-ok on receiving flow command. work by Lorenz
Quack <quack.lorenz@gmail.com>

Modified:
    qpid/trunk/qpid/python/qpid/client.py

Modified: qpid/trunk/qpid/python/qpid/client.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/client.py?rev=1683708&r1=1683707&r2=1683708&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/client.py (original)
+++ qpid/trunk/qpid/python/qpid/client.py Fri Jun  5 10:51:23 2015
@@ -208,7 +208,15 @@ class ClientDelegate(Delegate):
     ch.closed(msg)
 
   def channel_flow(self, ch, msg):
+    # On resuming we want to minimize the possibility of sending a message before flow-ok
has been sent.
+    # Therefore, we send flow-ok before we set the flow_control flag.
+    if msg.active:
+        msg.flow_ok()
     ch.set_flow_control(not msg.active)
+    # On pausing we want to minimize the possibility of sending a message after flow-ok has
been sent.
+    # Therefore, we send flow-ok after we set the flow_control flag.
+    if not msg.active:
+        msg.flow_ok()
 
   def session_ack(self, ch, msg):
     pass



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message