1
0

network: don't store unanswered request if result is in cache

This commit is contained in:
ThomasV
2015-05-17 09:00:36 +02:00
parent 6d0bc5d9b3
commit e33bc2473b
2 changed files with 5 additions and 4 deletions

View File

@@ -115,7 +115,7 @@ class NetworkServer(util.DaemonThread):
def __init__(self, config):
util.DaemonThread.__init__(self)
self.debug = False
self.debug = 1
self.config = config
self.network = Network(config)
# network sends responses on that queue
@@ -130,7 +130,7 @@ class NetworkServer(util.DaemonThread):
self.requests = {}
def add_client(self, client):
for key in ['status','banner','updated','servers','interfaces']:
for key in ['status', 'banner', 'updated', 'servers', 'interfaces']:
value = self.network.get_status_value(key)
client.response_queue.put({'method':'network.status', 'params':[key, value]})
with self.lock: