You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Related to flask-socketio #1174, I needed to be able to disconnect clients by their sid from external processes (such as Celery). Thanks to the work done in flask-socketio #1174 this is possible, but it looks like it may have partially broken somewhere along the way. Calling disconnect on a write_only manager doesn't throw an exception, but nothing happens. I've inspected the messages being sent through redis and it simply isn't sending one. That said, calling can_disconnect or _publish directly both work.
To Reproduce
I have only tested with an AsyncServer and redis, so I'm not sure at the moment if it affects all managers. Note though that the manager I'm calling disconnect on is a sync redis manager.
Connect to the SocketIO server and grab the sid (not strictly necessary)
Run external_sio.disconnect('sid_here', namespace='/some_namespace')
Observe that the client isn't disconnected. Furthermore, you'll notice that the pubsub message: disconnect log doesn't show up (see this line). I subclassed the manager and confirmed that nothing was being received at all, so it isn't just getting stopped somewhere in the middle of _thread.
Expected behavior
The disconnect event should be sent through redis.
Logs
No logs, but that's part of the problem 😄
Additional context
Thank you so much for this fantastic library, it's a life saver. To anyone else experiencing this in the meantime, you can use external_sio.can_disconnect instead.
The text was updated successfully, but these errors were encountered:
Looking at that bug fix it seems I only implemented this so that it works with multiple servers. It appears I forgot to implement the disconnect method for the pub/sub manager classes. I'll look into it.
Describe the bug
Related to flask-socketio #1174, I needed to be able to disconnect clients by their sid from external processes (such as Celery). Thanks to the work done in flask-socketio #1174 this is possible, but it looks like it may have partially broken somewhere along the way. Calling
disconnect
on a write_only manager doesn't throw an exception, but nothing happens. I've inspected the messages being sent through redis and it simply isn't sending one. That said, callingcan_disconnect
or_publish
directly both work.To Reproduce
I have only tested with an
AsyncServer
and redis, so I'm not sure at the moment if it affects all managers. Note though that the manager I'm callingdisconnect
on is a sync redis manager.sid
(not strictly necessary)external_sio.disconnect('sid_here', namespace='/some_namespace')
pubsub message: disconnect
log doesn't show up (see this line). I subclassed the manager and confirmed that nothing was being received at all, so it isn't just getting stopped somewhere in the middle of_thread
.Expected behavior
The disconnect event should be sent through redis.
Logs
No logs, but that's part of the problem 😄
Additional context
Thank you so much for this fantastic library, it's a life saver. To anyone else experiencing this in the meantime, you can use
external_sio.can_disconnect
instead.The text was updated successfully, but these errors were encountered: