readd the connection destructor
Since Connection.disconnect() now verifies that the current process owns
the connection before shutting the socket down we can safely readd
the destructor just to make sure things are really cleaned up
@@ -471,6 +471,12 @@ class Connection(object):
def __repr__(self):
return self.description_format % self._description_args
+ def __del__(self):
+ try:
+ self.disconnect()
+ except Exception:
+ pass
+
def register_connect_callback(self, callback):
self._connect_callbacks.append(callback)
