feat: add extension clean-up endpoint

This commit is contained in:
Vlad Stan 2023-02-17 14:57:31 +02:00
parent 230729483c
commit 7ec3045130
4 changed files with 29 additions and 6 deletions

View file

@ -52,6 +52,10 @@ class NostrClientManager:
self._clients[relay_id] = []
return self._clients[relay_id]
async def stop(self):
for relay_id in self._active_relays:
await self._stop_clients_for_relay(relay_id)
async def _stop_clients_for_relay(self, relay_id: str):
for client in self.clients(relay_id):
if client.relay_id == relay_id: