Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rooms() doesn't return previous rooms after client disconnection #400

Open
EpicEric opened this issue Dec 20, 2019 · 0 comments
Open

rooms() doesn't return previous rooms after client disconnection #400

EpicEric opened this issue Dec 20, 2019 · 0 comments
Assignees

Comments

@EpicEric
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants