From: Ed Page Date: Tue, 9 Feb 2010 13:18:19 +0000 (-0600) Subject: Fixing a resource leak where on connection failure, the connection would be left... X-Git-Url: http://git.maemo.org/git/?p=theonering;a=commitdiff_plain;h=b1564246eeb9d052854c119f19b603414b780e84;hp=f8ffc8e5741b1dc7f7ac43ca80a66191b8c881b1 Fixing a resource leak where on connection failure, the connection would be left around --- diff --git a/src/connection.py b/src/connection.py index 22d6885..73ec4a4 100644 --- a/src/connection.py +++ b/src/connection.py @@ -207,17 +207,11 @@ class TheOneRingConnection( self.__channelManager.channel_for_props(publishProps, signal=True) except gvoice.backend.NetworkError, e: _moduleLogger.exception("Connection Failed") - self.StatusChanged( - telepathy.CONNECTION_STATUS_DISCONNECTED, - telepathy.CONNECTION_STATUS_REASON_NETWORK_ERROR - ) + self.disconnect(telepathy.CONNECTION_STATUS_REASON_NETWORK_ERROR) return except Exception, e: _moduleLogger.exception("Connection Failed") - self.StatusChanged( - telepathy.CONNECTION_STATUS_DISCONNECTED, - telepathy.CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED - ) + self.disconnect(telepathy.CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED) return _moduleLogger.info("Connected")