Skip to content

Does not play nice with adapters #32

@kevinludwig

Description

@kevinludwig

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions