summaryrefslogtreecommitdiff
path: root/python/qpid/messaging.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-11-14 16:08:05 +0000
committerRafael H. Schloming <rhs@apache.org>2009-11-14 16:08:05 +0000
commit454379917ad7b797a045cbefc56bf598e3fd534b (patch)
tree9b339c50c2a9a4abd7d993874f0699dcfb043d0f /python/qpid/messaging.py
parentcaac82682127f212d2d714154d09fc51244cd4ae (diff)
downloadqpid-python-454379917ad7b797a045cbefc56bf598e3fd534b.tar.gz
added support for sender/receiver delete, made tests clean up after themselves, split logging of raw bytes and unencoded ops into distinct categories
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@836200 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging.py')
-rw-r--r--python/qpid/messaging.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/python/qpid/messaging.py b/python/qpid/messaging.py
index ec1c054e14..703a958425 100644
--- a/python/qpid/messaging.py
+++ b/python/qpid/messaging.py
@@ -436,14 +436,15 @@ class Session:
"""
Close the session.
"""
+ # XXX: should be able to express this condition through API calls
+ self._ewait(lambda: not self.outgoing and not self.acked)
+
for link in self.receivers + self.senders:
link.close()
self.closing = True
self._wakeup()
self._ewait(lambda: self.closed)
- # XXX: should be able to express this condition through API calls
- self._ewait(lambda: not self.outgoing and not self.acked)
self.connection._remove_session(self)
class SendError(SessionError):
@@ -557,10 +558,12 @@ class Sender:
"""
Close the Sender.
"""
- # XXX: should make driver do something here
- if not self.closed:
+ self.closing = True
+ self._wakeup()
+ try:
+ self.session._ewait(lambda: self.closed)
+ finally:
self.session.senders.remove(self)
- self.closed = True
class ReceiveError(SessionError):
pass