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
Using socket.disconnect(false) on root namespace breaks all communication #2433
Comments
See https://github.com/socketio/socket.io/pull/2415/files and #2400 that seems to be the intended behaviour. |
You misunderstand the issue I'm reporting. I know that disconnecting the socket from a namespace (disconnect(false)) closes that socket's connection to the namespace. That's my goal. What I'm saying is that disconnecting the socket from the root namespace breaks other namespaces as well. Please refer to my example, it's very short and to the point. The client connects to 3 namespaces, if you include root. Disconnecting from root should not prevent the transmission of events on the other 2 namespaces, and yet it does. Root namespace has a special behavior, different from all the other namespaces, this should be viewed as an implementation bug. At the very least, the documentation should me mentioning this issue. |
Yes, I agree that the documentation should mentions this. |
That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible). |
I've got a very short example here: https://github.com/manad777/sio-root-bug
Run it, and it should work fine. However, uncomment lines 32-34 in index.js, and all communication stops silently.
The lines in question are:
Essentially, I can use socket.disconnect(false) on any namespace, but if I use it on the root namespace, all communication stops.
The text was updated successfully, but these errors were encountered: