mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-29 16:31:29 +00:00
fix daemon timeout
This commit is contained in:
parent
a63eaa3c4e
commit
35a12b22cf
1 changed files with 4 additions and 4 deletions
|
@ -91,8 +91,8 @@ class ClientThread(threading.Thread):
|
||||||
threading.Thread(target=self.reading_thread).start()
|
threading.Thread(target=self.reading_thread).start()
|
||||||
while self.running:
|
while self.running:
|
||||||
try:
|
try:
|
||||||
response = self.response_queue.get()
|
response = self.response_queue.get(timeout=0.1)
|
||||||
except util.timeout:
|
except Queue.Empty:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
self.client_pipe.send(response)
|
self.client_pipe.send(response)
|
||||||
|
@ -142,13 +142,13 @@ class NetworkServer(threading.Thread):
|
||||||
client.response_queue.put({'method':'network.status', 'params':[key, value]})
|
client.response_queue.put({'method':'network.status', 'params':[key, value]})
|
||||||
with self.lock:
|
with self.lock:
|
||||||
self.clients.append(client)
|
self.clients.append(client)
|
||||||
|
print_error("new client:", len(self.clients))
|
||||||
|
|
||||||
def remove_client(self, client):
|
def remove_client(self, client):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
self.clients.remove(client)
|
self.clients.remove(client)
|
||||||
print_error("client quit:", len(self.clients))
|
print_error("client quit:", len(self.clients))
|
||||||
|
|
||||||
|
|
||||||
def send_request(self, client, request):
|
def send_request(self, client, request):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
self.request_id += 1
|
self.request_id += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue