Skip to content

Signaling in rooms crashes due to foreach function not returning as intended. Bodge provided  #69

@twofingerrightclick

Description

@twofingerrightclick

I am trying to do signaling in rooms. I looked to the "p2p-snake" example and the socket-io-p2p documentation for how to pass the P2P server the socket and the room, however both the my code and the p2p-snake example crash here at line 25 of socket.io-p2p-server's index.js:
image
The socket.on('offers') call back's foreach is able to get a undefined peer client when it goes for it in the clients array - client=clients[client.id].
In my code the connectedClients only contains one client - the one that equals the socket in if (client !== socket) as my p2p server currently starts signaling as soon as the client connects. In the p2p-snake code, it crashes immediately as well once one client is connected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions