svc/conntrack.in: Keep the D-Bus monitor alive.
[tripe] / svc / conntrack.in
index 5f4cc98..18e2f73 100644 (file)
@@ -457,12 +457,13 @@ def init():
   Add the D-Bus monitor here, because we might send commands off immediately,
   and we want to make sure the server connection is up.
   """
-  T.Coroutine(kickpeers).switch()
-  dbm = DBusMonitor()
-  dbm.addmon(NetworkManagerMonitor())
-  dbm.addmon(MaemoICdMonitor())
-  G.timeout_add_seconds(300, lambda: (netupdown(True, ['interval-timer'])
-                                      or True))
+  global DBM
+  T.Coroutine(kickpeers, name = 'kickpeers').switch()
+  DBM = DBusMonitor()
+  DBM.addmon(NetworkManagerMonitor())
+  DBM.addmon(MaemoICdMonitor())
+  G.timeout_add_seconds(30, lambda: (netupdown(True, ['interval-timer'])
+                                     or True))
 
 def parse_options():
   """