Browse Source

add fixes for the sync version

pull/1423/head
Miguel Grinberg 3 months ago
parent
commit
248aba0621
Failed to extract signature
  1. 8
      src/socketio/admin.py

8
src/socketio/admin.py

@ -216,12 +216,12 @@ class InstrumentedServer:
), 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)
@ -303,9 +303,9 @@ class InstrumentedServer:
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,

Loading…
Cancel
Save