diff options
author | Pavel Moravec <pmoravec@apache.org> | 2013-10-22 14:30:42 +0000 |
---|---|---|
committer | Pavel Moravec <pmoravec@apache.org> | 2013-10-22 14:30:42 +0000 |
commit | 98130fc617b306585f3e249b21dfd462ca392d9c (patch) | |
tree | 53416e38331d0ee62452849b52d0536801f1cc8a /python | |
parent | 9307b57141fa5b547877c804dd47c9eceed89d35 (diff) | |
download | qpid-python-98130fc617b306585f3e249b21dfd462ca392d9c.tar.gz |
QPID-5203 Python client unexpected exception after ACL denial
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1534643 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r-- | python/qpid/messaging/endpoints.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/python/qpid/messaging/endpoints.py b/python/qpid/messaging/endpoints.py index 6f0e9432dc..d686f0dd77 100644 --- a/python/qpid/messaging/endpoints.py +++ b/python/qpid/messaging/endpoints.py @@ -750,6 +750,7 @@ class Session(Endpoint): """ Close the session. """ + self.error = None self.sync(timeout=timeout) for link in self.receivers + self.senders: @@ -920,8 +921,9 @@ class Sender(Endpoint): self._wakeup() try: - if not self.session._ewait(lambda: self.closed, timeout=timeout): - raise Timeout("sender close timed out") + if not self.session.closed: + if not self.session._ewait(lambda: self.closed, timeout=timeout): + raise Timeout("sender close timed out") finally: try: self.session.senders.remove(self) @@ -1067,8 +1069,9 @@ class Receiver(Endpoint, object): self._wakeup() try: - if not self.session._ewait(lambda: self.closed, timeout=timeout): - raise Timeout("receiver close timed out") + if not self.session.closed: + if not self.session._ewait(lambda: self.closed, timeout=timeout): + raise Timeout("receiver close timed out") finally: try: self.session.receivers.remove(self) |