Skip to content

Commit

Permalink
api: Changing message type to event, multiple WS connections
Browse files Browse the repository at this point in the history
  • Loading branch information
okbrandon committed Nov 14, 2024
1 parent 80350a7 commit aec6cd7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/api/consumers/tournaments.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,7 @@ async def handle_identify(self, data):
if connection_count + 1 >= 2:
try:
self.send(json.dumps({
"type": "connection_error",
"message": "You can only have 2 connections at the same time"
"e": "CONNECTION_ERROR"
}))
await self.close(code=42)
except Exception as _:
Expand Down

0 comments on commit aec6cd7

Please sign in to comment.