mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: do not try to disconnect ws if not connected (#2527)
cf https://umap.sentry.io/issues/6331841272/
This commit is contained in:
commit
fc6ea191cc
1 changed files with 6 additions and 5 deletions
|
@ -112,6 +112,7 @@ class Peer:
|
||||||
self.client = redis.from_url(settings.REDIS_URL)
|
self.client = redis.from_url(settings.REDIS_URL)
|
||||||
|
|
||||||
async def disconnect(self):
|
async def disconnect(self):
|
||||||
|
if self.is_authenticated:
|
||||||
await self.client.hdel(self.room_key, self.peer_id)
|
await self.client.hdel(self.room_key, self.peer_id)
|
||||||
for pubsub in self._subscriptions:
|
for pubsub in self._subscriptions:
|
||||||
await pubsub.unsubscribe()
|
await pubsub.unsubscribe()
|
||||||
|
|
Loading…
Reference in a new issue