-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Socket still fires event after disconnect #3095
Comments
I believe I found out why this happens. If I'm reading the code right, it emits normal events in Could any of the developers confirm that this is what is happening? |
darrachequesne
added a commit
that referenced
this issue
Feb 26, 2021
For future readers: this was (finally) fixed by 494c64e and included in |
dzad
pushed a commit
to dzad/socket.io
that referenced
this issue
May 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You want to:
Current behaviour
I'm sending certain tasks to connected clients (all using Chrome), the clients then send back the result of the task. Of course, all tasks need to be completed and thus a task should be sent to another client when the first client disconnects.
So this is what is happening:
socket.on('disconnect', ...)
)socket.on('completion', ...)
)I have no idea how this is even possible. I have spent literally days trying to understand why the server would freeze and I just discovered this by doing the following:
Steps to reproduce (if the current behaviour is a bug)
I can't really give 'steps'. All I can say is that i'm sending tasks to the client that are finished within a second, and i'm sending 1000s of them sequentially. I should also mention that each client has X sockets doing tasks, one for every CPU core.
Expected behaviour
Should not fire an event when disconnected.
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered: