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

Not able to get the list of rooms the client is currently in on disconnect event #282

Closed
vtjeng opened this issue Jul 14, 2016 · 1 comment
Labels

Comments

@vtjeng
Copy link

vtjeng commented Jul 14, 2016

An issue in the repo for socket.io summarizes why it would be useful to get the list of rooms a client is in when they disconnect (I think this is frequently needed functionality), and outlines several possible hacky fixes. What is the appropriate approach in Flask-SocketIO?

@miguelgrinberg
Copy link
Owner

This was actually raised as an issue on the python-socketio repo a few days ago. See miguelgrinberg/python-socketio#33.

I have merged the solution that was proposed, which basically kept the disconnected user in all the rooms until after the disconnect event handler is invoked. So it is now perfectly fine to query the user for the rooms, and then possibly broadcast something to those rooms to let others know the user left.

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

No branches or pull requests

2 participants