Skip to content

Signaling in room causes crash immediately #1

@twofingerrightclick

Description

@twofingerrightclick

Hello! I came across this project after reading the socket.io-p2p documentation's reference to it for how signaling in rooms can be done. However the server crashes immediately upon running at the signaling in rooms part 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].
The connectedClients only contains one client - the one that equals the socket in if (client !== socket).

A bodge is to just add if(client) anywhere socket.io-p2p's index.js uses this foreach: Object.keys(connectedClients).forEach(function (clientId, i) { var client = clients[clientId] if (client && client !== socket) {

Am I missing something? Thank you.

I also posted this issue on socket.io-p2p's repo. Not sure where to address.

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