Skip to content

Commit

Permalink
Fix logging of missing sid (Fixes miguelgrinberg/Flask-SocketIO#1472)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Feb 2, 2021
1 parent e8e4ba5 commit cdfc1d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engineio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ def handle_request(self, environ, start_response):
del self.sockets[sid]
elif method == 'POST':
if sid is None or sid not in self.sockets:
self._log_error_once('Invalid session ' + sid, 'bad-sid')
r = self._bad_request('Invalid session ' + sid)
self._log_error_once(
'Invalid session ' + (sid or 'None'), 'bad-sid')
r = self._bad_request('Invalid session ' + (sid or 'None'))
else:
socket = self._get_socket(sid)
try:
Expand Down

0 comments on commit cdfc1d8

Please sign in to comment.