chore: do not try to disconnect ws if not connected

cf https://umap.sentry.io/issues/6331841272/
This commit is contained in:
Yohan Boniface 2025-02-26 09:41:03 +01:00
parent 6e40388f7d
commit dc35039af8

View file

@ -112,6 +112,7 @@ class Peer:
self.client = redis.from_url(settings.REDIS_URL)
async def disconnect(self):
if self.is_authenticated:
await self.client.hdel(self.room_key, self.peer_id)
for pubsub in self._subscriptions:
await pubsub.unsubscribe()