summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-10-30 10:08:56 +0000
committerGordon Sim <gsim@apache.org>2013-10-30 10:08:56 +0000
commit2fa546d16691e9c9b54d36b7861baa1be00aecc7 (patch)
tree07b080e2cad04291f1c08cf0ca91b202ab438593 /python
parent1ea4f741fd1559524717cc167cb7890d52f4481b (diff)
downloadqpid-python-2fa546d16691e9c9b54d36b7861baa1be00aecc7.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/qpid@1537030 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/qpid/messaging/endpoints.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/python/qpid/messaging/endpoints.py b/python/qpid/messaging/endpoints.py
index 7cd3931465..e69d7a10ae 100644
--- a/python/qpid/messaging/endpoints.py
+++ b/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)