summaryrefslogtreecommitdiff
path: root/qpid/python/qpid/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/python/qpid/client.py')
-rw-r--r--qpid/python/qpid/client.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/qpid/python/qpid/client.py b/qpid/python/qpid/client.py
index 24b238f05e..3bbc097d25 100644
--- a/qpid/python/qpid/client.py
+++ b/qpid/python/qpid/client.py
@@ -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