Skip to content

Commit

Permalink
Discard channel from group when disconnecting
Browse files Browse the repository at this point in the history
See also: #17
  • Loading branch information
BECATRUE committed Dec 3, 2024
1 parent d6b5d20 commit 6985874
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wlm_server/operation/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ async def connect(self):
self.group_name = f'channel_{self.ch}'
await self.channel_layer.group_add(self.group_name, self.channel_name)
await self.accept()

async def disconnect(self, code):
await self.channel_layer.group_discard(self.group_name, self.channel_name)

0 comments on commit 6985874

Please sign in to comment.