-
Notifications
You must be signed in to change notification settings - Fork 4
Signaling in room causes crash immediately #1
Description
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:

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.