Skip to content

Commit

Permalink
Fix KeyError during WebSocket disconnection in AsyncServer (Fixes #179)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jun 30, 2020
1 parent d6ae500 commit f43807b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engineio/asyncio_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ async def _handle_connect(self, environ, transport, b64=False,

if transport == 'websocket':
ret = await s.handle_get_request(environ)
if s.closed:
if s.closed and sid in self.sockets:
# websocket connection ended, so we are done
del self.sockets[sid]
return ret
Expand Down

0 comments on commit f43807b

Please sign in to comment.