refactor: move stop logic

This commit is contained in:
Vlad Stan 2023-06-22 14:33:26 +03:00
parent 4238be498f
commit c0632cabe5
2 changed files with 10 additions and 6 deletions

View file

@ -152,11 +152,6 @@ async def ws_relay(websocket: WebSocket) -> None:
while True:
await asyncio.sleep(10)
if not router.connected:
for s in router.subscriptions:
try:
nostr.client.relay_manager.close_subscription(s)
except:
pass
await router.stop()
all_routers.remove(router)
break