diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/qpid/messaging/endpoints.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/python/qpid/messaging/endpoints.py b/python/qpid/messaging/endpoints.py index be07c0818f..7ac3881bac 100644 --- a/python/qpid/messaging/endpoints.py +++ b/python/qpid/messaging/endpoints.py @@ -187,7 +187,7 @@ class Connection: """ self._connected = False self._wakeup() - self._ewait(lambda: not self._transport_connected) + self._wait(lambda: not self._transport_connected) self._driver.stop() self._condition.gc() @@ -203,9 +203,11 @@ class Connection: """ Close the connection and all sessions. """ - for ssn in self.sessions.values(): - ssn.close() - self.disconnect() + try: + for ssn in self.sessions.values(): + ssn.close() + finally: + self.disconnect() class Session: |
