start callbacks on main thread
This commit is contained in:
parent
c7e316ab22
commit
de9a172f39
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ class Node(Thread):
|
|||
self._opener = get_opener(self.user_id)
|
||||
self._q = Queue()
|
||||
self._pingcb = PeriodicCallback(self.ping, 10 * settings.server['pull_interval'])
|
||||
self._pingcb.start()
|
||||
state.main.add_callback(self._pingcb.start)
|
||||
Thread.__init__(self)
|
||||
self.daemon = True
|
||||
self.start()
|
||||
|
@ -512,7 +512,7 @@ class Nodes(Thread):
|
|||
self.queue('add', u.id, True)
|
||||
self.local = LocalNodes()
|
||||
self._pullcb = PeriodicCallback(self.pull, settings.server['pull_interval'])
|
||||
self._pullcb.start()
|
||||
state.main.add_callback(self._pingcb.start)
|
||||
Thread.__init__(self)
|
||||
self.daemon = True
|
||||
self.start()
|
||||
|
|
Loading…
Reference in a new issue