You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
You want to:
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 youaddAll
a socket to room xxx and then immediately.to(xxx).emit(...)
, your message doesn't necessarily end up back at that socket.The text was updated successfully, but these errors were encountered: