fix addpeer

This commit is contained in:
j 2016-01-13 20:49:48 +05:30
commit c66433c740
2 changed files with 9 additions and 3 deletions

View file

@ -54,6 +54,7 @@ class Node(Thread):
self._pull = PeriodicCallback(self.pull, 60000)
self._pull.start()
self.ping()
self.pull()
def run(self):
while self._running:
@ -68,7 +69,8 @@ class Node(Thread):
elif action == 'pull':
self._pulling = True
self.online = self.can_connect()
self.pullChanges()
if self.online:
self.pullChanges()
self._pulling = False
else:
logger.debug('unknown action %s', action)