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

socket.io does not alert adapter when it is shutting down #3660

Closed
1 of 2 tasks
bytenik opened this issue Oct 5, 2020 · 0 comments
Closed
1 of 2 tasks

socket.io does not alert adapter when it is shutting down #3660

bytenik opened this issue Oct 5, 2020 · 0 comments

Comments

@bytenik
Copy link
Contributor

bytenik commented Oct 5, 2020

You want to:

  • report a bug
  • request a feature

Current behaviour

socket.io does not notify its adapter that it is shutting down (closing). As a result, there is no opportunity to stop long-running processes within the socket or disconnect from whatever scale-out solution is being used.

Expected behaviour

socket.io should call a method on the adapter to indicate shutdown. It need not wait for a callback, because if shutdown fails, what are you going to do -- not shut down? The in-memory adapter can simply make this function a no-op. While I haven't reviewed the Redis adapter in enough depth to see if there is utility to this function in that adapter, I would imagine that it would be good to detach from Redis to return system resources.

Other information (e.g. stacktraces, related issues, suggestions how to fix)

This is particularly critical for the adapter I am developing that works with AWS SQS/SNS -- https://github.com/thinkalpha/socket.io-sqs

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

No branches or pull requests

1 participant