From 9468d907140344ae1f26a6690d8c93c102ea56bb Mon Sep 17 00:00:00 2001 From: j Date: Sun, 14 Feb 2016 11:23:55 +0530 Subject: [PATCH] more pings --- oml/nodes.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/oml/nodes.py b/oml/nodes.py index be84eae..00c28e4 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -47,10 +47,10 @@ class Node(Thread): self._q = Queue() Thread.__init__(self) self.daemon = True - self.ping() self.start() def run(self): + self.ping() while not state.shutdown: action = self._q.get() if state.shutdown: @@ -470,8 +470,7 @@ class Nodes(Thread): with db.session(): self._nodes[user_id] = Node(self, User.get_or_create(user_id)) else: - if not self._nodes[user_id].online: - self._nodes[user_id].ping() + self._nodes[user_id].ping() if send_response: self._nodes[user_id].send_response()