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()