Skip to content

Commit

Permalink
add fixes for the sync version
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Dec 29, 2024
1 parent 26529bf commit 248aba0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/socketio/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ def _connect(self, eio_sid, namespace):
), namespace=self.admin_namespace)
return sid

def _disconnect(self, sid, namespace, **kwargs):
def _disconnect(self, sid, namespace, reason, **kwargs):
del self.sio.manager._timestamps[sid]
self.sio.emit('socket_disconnected', (
namespace,
sid,
'N/A',
reason or 'N/A',
datetime.utcnow().isoformat() + 'Z',
), namespace=self.admin_namespace)
return self.sio.manager.__disconnect(sid, namespace, **kwargs)
Expand Down Expand Up @@ -303,9 +303,9 @@ def _handle_eio_connect(self, eio_sid, environ):
self.event_buffer.push('rawConnection')
return self.sio._handle_eio_connect(eio_sid, environ)

def _handle_eio_disconnect(self, eio_sid):
def _handle_eio_disconnect(self, eio_sid, reason):
self.event_buffer.push('rawDisconnection')
return self.sio._handle_eio_disconnect(eio_sid)
return self.sio._handle_eio_disconnect(eio_sid, reason)

def _eio_http_response(self, packets=None, headers=None, jsonp_index=None):
ret = self.sio.eio.__ok(packets=packets, headers=headers,
Expand Down

0 comments on commit 248aba0

Please sign in to comment.