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
in your broadcast method, you're simply doing a forEach over every socket and emitting directly to the socket. I think when you do that you're not allowing for the fact that there may be multiple nodes (and thus sockets that should be broadcast to that are not in the same process or on the same machine).
I think you can fix this by doing io.sockets.emit(...) to emit to all sockets and not just the in-process ones.
Note: I haven't tried this yet but its the impression I get when I read the code; and I'm unable to get multi-instance working with socket.io-redis.
The text was updated successfully, but these errors were encountered:
in your broadcast method, you're simply doing a
forEach
over every socket and emitting directly to the socket. I think when you do that you're not allowing for the fact that there may be multiple nodes (and thus sockets that should be broadcast to that are not in the same process or on the same machine).I think you can fix this by doing
io.sockets.emit(...)
to emit to all sockets and not just the in-process ones.Note: I haven't tried this yet but its the impression I get when I read the code; and I'm unable to get multi-instance working with
socket.io-redis
.The text was updated successfully, but these errors were encountered: