From b1564246eeb9d052854c119f19b603414b780e84 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 9 Feb 2010 07:18:19 -0600 Subject: [PATCH] Fixing a resource leak where on connection failure, the connection would be left around --- src/connection.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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") -- 1.7.9.5