fix: thread not dead
This commit is contained in:
parent
3b08714a84
commit
403c8f1b05
2 changed files with 11 additions and 8 deletions
|
|
@ -102,12 +102,14 @@ class Relay:
|
|||
message = self.queue.get(timeout=1)
|
||||
self.num_sent_events += 1
|
||||
self.ws.send(message)
|
||||
except Exception as e:
|
||||
if self.shutdown:
|
||||
logger.warning(f"Closing queue worker for '{self.url}'.")
|
||||
break
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
time.sleep(0.1)
|
||||
|
||||
if self.shutdown:
|
||||
logger.warning(f"Closing queue worker for '{self.url}'.")
|
||||
break
|
||||
|
||||
def add_subscription(self, id, filters: Filters):
|
||||
with self.lock:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue