X-Git-Url: http://git.maemo.org/git/?p=theonering;a=blobdiff_plain;f=src%2Fconnection_manager.py;h=b9a8e3777452a2e8893872112cd46cbdf5d4b764;hp=cddba2aa314318d17dfa8e84efc48a3306c1eacd;hb=7cdc5ab1a3dd83850275056e4c50fcb84a30586e;hpb=69291b6ea410825bc288f4071e4a2bd200bdac2e diff --git a/src/connection_manager.py b/src/connection_manager.py index cddba2a..b9a8e37 100644 --- a/src/connection_manager.py +++ b/src/connection_manager.py @@ -9,11 +9,13 @@ import util.misc as misc_utils import connection -_moduleLogger = logging.getLogger("connection_manager") +_moduleLogger = logging.getLogger(__name__) class TheOneRingConnectionManager(tp.ConnectionManager): + IDLE_TIMEOUT = 10 + def __init__(self, shutdown_func=None): tp.ConnectionManager.__init__(self, constants._telepathy_implementation_name_) @@ -59,12 +61,8 @@ class TheOneRingConnectionManager(tp.ConnectionManager): return result - def disconnected(self, conn): - """ - Overrides tp.ConnectionManager - """ - result = tp.ConnectionManager.disconnected(self, conn) - gobject_utils.timeout_add_seconds(5, self._shutdown) + def disconnect_completed(self): + gobject_utils.timeout_add_seconds(self.IDLE_TIMEOUT, self._shutdown) def quit(self): """