diff options
| author | Gordon Sim <gsim@apache.org> | 2013-10-30 10:08:56 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-10-30 10:08:56 +0000 |
| commit | b5046b91c2f81a81bb11c28cc5a13c79de8aeeaf (patch) | |
| tree | 4e3d56479473c5408484ba750cc28f66cbac0181 /qpid/python | |
| parent | 7955c1e2aa5b95eb71427eb19326b12780d06dcd (diff) | |
| download | qpid-python-b5046b91c2f81a81bb11c28cc5a13c79de8aeeaf.tar.gz | |
QPID-5203: if session error exists, simply return from session close (also reverts previous fix)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1537030 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/qpid/messaging/endpoints.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/qpid/python/qpid/messaging/endpoints.py b/qpid/python/qpid/messaging/endpoints.py index 7cd3931465..e69d7a10ae 100644 --- a/qpid/python/qpid/messaging/endpoints.py +++ b/qpid/python/qpid/messaging/endpoints.py @@ -750,7 +750,7 @@ class Session(Endpoint): """ Close the session. """ - self.error = None + if self.error: return self.sync(timeout=timeout) for link in self.receivers + self.senders: @@ -921,9 +921,8 @@ class Sender(Endpoint): self._wakeup() try: - if not self.session.closed: - if not self.session._ewait(lambda: self.closed, timeout=timeout): - raise Timeout("sender close timed out") + if not self.session._ewait(lambda: self.closed, timeout=timeout): + raise Timeout("sender close timed out") finally: try: self.session.senders.remove(self) @@ -1069,9 +1068,8 @@ class Receiver(Endpoint, object): self._wakeup() try: - if not self.session.closed: - if not self.session._ewait(lambda: self.closed, timeout=timeout): - raise Timeout("receiver close timed out") + if not self.session._ewait(lambda: self.closed, timeout=timeout): + raise Timeout("receiver close timed out") finally: try: self.session.receivers.remove(self) |
