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

adapter functions don't get callback argument or opportunity to return a promise, so there's no way to do long-running processes such as join to room #3661

Closed
1 task done
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 calls functions on the adapter, and then immediately invokes its own internal callback function with an argument of null.

Expected behaviour

socket.io should pass a callback function to adapter functions and then use that to trigger callback to the rest of the socket.io stack.

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
Specifically, actions like addAll can't be properly handled in time; e.g. if you addAll a socket to room xxx and then immediately .to(xxx).emit(...), your message doesn't necessarily end up back at that socket.

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