From 00aaa1d06595d80c628023f5222186f59c28f529 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 4 Aug 2014 11:38:34 +0200 Subject: [PATCH] send network status on init, if there is no daemon --- lib/network_proxy.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/network_proxy.py b/lib/network_proxy.py index d43d4d5d3..50168dc77 100644 --- a/lib/network_proxy.py +++ b/lib/network_proxy.py @@ -32,12 +32,6 @@ from simple_config import SimpleConfig from daemon import NetworkServer, DAEMON_PORT -# policies -SPAWN_DAEMON=0 -NEED_DAEMON=1 -NO_DAEMON=2 -USE_DAEMON_IF_AVAILABLE=3 - class NetworkProxy(threading.Thread): @@ -64,6 +58,9 @@ class NetworkProxy(threading.Thread): self.network = Network(config) self.pipe = util.QueuePipe(send_queue=self.network.requests_queue) self.network.start(self.pipe.get_queue) + for key in ['status','banner','updated','servers','interfaces']: + value = self.network.get_status_value(key) + self.pipe.get_queue.put({'method':'network.status', 'params':[key, value]}) # status variables self.status = 'connecting'