chore: do not try to disconnect ws if not connected (#2527)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run

cf https://umap.sentry.io/issues/6331841272/
This commit is contained in:
Yohan Boniface 2025-02-26 15:18:34 +01:00 committed by GitHub
commit fc6ea191cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()