Author: pmoravec
Date: Tue Oct 22 14:30:42 2013
New Revision: 1534643

URL: http://svn.apache.org/r1534643
Log:
QPID-5203 Python client unexpected exception after ACL denial

Modified:
    qpid/trunk/qpid/python/qpid/messaging/endpoints.py

Modified: qpid/trunk/qpid/python/qpid/messaging/endpoints.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/endpoints.py?rev=1534643&r1=1534642&r2=1534643&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/endpoints.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/endpoints.py Tue Oct 22 14:30:42 2013
@@ -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)



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to