diff options
author | Rafael H. Schloming <rhs@apache.org> | 2008-05-09 21:41:24 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2008-05-09 21:41:24 +0000 |
commit | f131daf74eebcd4630fdf363bc23bba20dc567f4 (patch) | |
tree | 16812bccaa44407f19d02802eb7ef9539b3b2c3b /python/qpid/session.py | |
parent | bd21fa3d28c6b0e958667305ae87c4587d67d57c (diff) | |
download | qpid-python-f131daf74eebcd4630fdf363bc23bba20dc567f4.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/qpid@654947 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/session.py')
-rw-r--r-- | python/qpid/session.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/qpid/session.py b/python/qpid/session.py index aa0446b941..a77ef91c0f 100644 --- a/python/qpid/session.py +++ b/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) |