Skip to content

Commit

Permalink
End WebSocket connection gracefully when user is intentionally discon…
Browse files Browse the repository at this point in the history
…nected (#168)
  • Loading branch information
deounix committed May 22, 2020
1 parent 0e0b26f commit e4d9c33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engineio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def _handle_connect(self, environ, start_response, transport, b64=False,

if transport == 'websocket':
ret = s.handle_get_request(environ, start_response)
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 e4d9c33

Please sign in to comment.