diff options
author | Louis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.co.uk> | 2010-10-21 17:13:20 -0400 |
---|---|---|
committer | Louis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.co.uk> | 2010-12-03 15:50:39 -0500 |
commit | 3b08436fdc8b1aff22591cbaa371fc76d9e9a306 (patch) | |
tree | a8ecd0ca3fe6e988b699ee5e0ee8ae226855d670 | |
parent | c546279e401390a6586e18fc3e9780c17fa0a2e3 (diff) |
bugfix: use timeout_add_seconds instead of timeout_add
(Might) avoid some useless wake-up
-rw-r--r-- | butterfly/connection_manager.py | 2 | ||||
-rwxr-xr-x | telepathy-butterfly | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/butterfly/connection_manager.py b/butterfly/connection_manager.py index c85f95d..dddf31b 100644 --- a/butterfly/connection_manager.py +++ b/butterfly/connection_manager.py @@ -80,7 +80,7 @@ class ButterflyConnectionManager(telepathy.server.ConnectionManager): self._shutdown() return False result = telepathy.server.ConnectionManager.disconnected(self, conn) - gobject.timeout_add(5000, shutdown) + gobject.timeout_add_seconds(5, shutdown) def quit(self): "Terminates all connections. Must be called upon quit" diff --git a/telepathy-butterfly b/telepathy-butterfly index da64c55..75e8332 100755 --- a/telepathy-butterfly +++ b/telepathy-butterfly @@ -53,7 +53,7 @@ from butterfly.util.decorator import async logger = logging.getLogger('Butterfly') -IDLE_TIMEOUT = 5000 +IDLE_TIMEOUT = 5 PROCESS_NAME = 'telepathy-butterfly' if __name__ == '__main__': @@ -92,7 +92,7 @@ if __name__ == '__main__': logger.info('No connection received - quitting') quit() return False - gobject.timeout_add(IDLE_TIMEOUT, timeout_cb) + gobject.timeout_add_seconds(IDLE_TIMEOUT, timeout_cb) shutdown_callback = quit else: shutdown_callback = None |