[bug] Consider events flag when ensuring client
authorVictor Shyba <victor.shyba@gmail.com>
Tue, 28 Jul 2015 19:26:14 +0000 (16:26 -0300)
committerVictor Shyba <victor.shyba@gmail.com>
Tue, 28 Jul 2015 19:26:14 +0000 (16:26 -0300)
Change EventsClientThread behavior so it won't start anymore if
the events flag is set to False

src/leap/common/events/client.py

index 1744341..8d8d522 100644 (file)
@@ -466,7 +466,7 @@ class EventsClientThread(threading.Thread, EventsClient):
         Make sure the events client thread is started.
         """
         with self._lock:
-            if not self.is_alive():
+            if flags.EVENTS_ENABLED and not self.is_alive():
                 self.daemon = True
                 self.start()
                 self._initialized.wait()