fix: thread not dead
This commit is contained in:
parent
3b08714a84
commit
403c8f1b05
2 changed files with 11 additions and 8 deletions
|
|
@ -44,12 +44,13 @@ class RelayManager:
|
|||
return relay
|
||||
|
||||
def remove_relay(self, url: str):
|
||||
self.threads[url].join(timeout=1)
|
||||
self.threads.pop(url)
|
||||
self.queue_threads[url].join(timeout=1)
|
||||
self.queue_threads.pop(url)
|
||||
self.relays[url].close()
|
||||
self.relays.pop(url)
|
||||
self.threads[url].join(timeout=5)
|
||||
self.threads.pop(url)
|
||||
self.queue_threads[url].join(timeout=5)
|
||||
self.queue_threads.pop(url)
|
||||
|
||||
|
||||
def add_subscription(self, id: str, filters: Filters):
|
||||
with self._subscriptions_lock:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue