summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-05-09 21:41:24 +0000
committerRafael H. Schloming <rhs@apache.org>2008-05-09 21:41:24 +0000
commit1f2d86d3dd25801f742831901e34317f5623e113 (patch)
treeb6deedff747ac4fdf5a197b6585459acc9c98319 /qpid/python
parent931c72fd890ebbd66b89d38e82ecc6e461062e59 (diff)
downloadqpid-python-1f2d86d3dd25801f742831901e34317f5623e113.tar.gz
QPID-947: made python client use execution.sync instead of session.flush when not in auto_sync mode
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@654947 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/session.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/qpid/python/qpid/session.py b/qpid/python/qpid/session.py
index aa0446b941..a77ef91c0f 100644
--- a/qpid/python/qpid/session.py
+++ b/qpid/python/qpid/session.py
@@ -93,7 +93,8 @@ class Session(Invoker):
def sync(self, timeout=None):
if currentThread() == self.channel.connection.thread:
raise SessionException("deadlock detected")
- self.channel.session_flush(completed=True)
+ if not self.auto_sync:
+ self.execution_sync()
last = self.sender.next_id - 1
if not wait(self.condition, lambda:
last in self.sender._completed or self.exceptions,
@@ -250,6 +251,9 @@ class Session(Invoker):
if result is not INCOMPLETE:
for seg in segments:
self.receiver.completed(seg)
+ # XXX: don't forget to obey sync for manual completion as well
+ if hdr.sync:
+ self.channel.session_completed(self.receiver._completed)
def send(self, seg):
self.sender.send(seg)