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
Hi! I'm currently using Flask-SocketIO and it's pretty great so far!
There was one error in my logic when a client joins/leaves rooms, where I tried to call flask_socketio.rooms() on a disconnect event, and it wasn't returning all rooms the client had joined up to the disconnection. When inspecting it, it only showed the default sid room -- which makes sense if the client is considered to have been removed from these rooms before the event handler is called.
Still, I had to add custom logic in my application to update/persist the rooms prior to the client disconnecting, and get the list of rooms from a custom map instead of calling rooms() to solve my problem. It'd be better if we could get the rooms that the client had joined up to this point, or if this behavior (rooms() will only return the client's sid if it has already disconnected) was documented for python-socketio and Flask-SocketIO.
The text was updated successfully, but these errors were encountered:
Hi! I'm currently using Flask-SocketIO and it's pretty great so far!
There was one error in my logic when a client joins/leaves rooms, where I tried to call
flask_socketio.rooms()
on a disconnect event, and it wasn't returning all rooms the client had joined up to the disconnection. When inspecting it, it only showed the default sid room -- which makes sense if the client is considered to have been removed from these rooms before the event handler is called.Still, I had to add custom logic in my application to update/persist the rooms prior to the client disconnecting, and get the list of rooms from a custom map instead of calling
rooms()
to solve my problem. It'd be better if we could get the rooms that the client had joined up to this point, or if this behavior (rooms() will only return the client's sid if it has already disconnected
) was documented for python-socketio and Flask-SocketIO.The text was updated successfully, but these errors were encountered: