simplewebrtc / signalmaster

simple socket.io server for webrtc signaling
Other
1.31k stars 486 forks source link

Crash on create room #4

Closed evilpacket closed 11 years ago

evilpacket commented 11 years ago
/home/signalmaster/signalmaster/server.js:81
            if (cb) cb(null, name);
                    ^
TypeError: string is not a function
    at Socket.<anonymous> (/home/signalmaster/signalmaster/server.js:81:21)
    at Socket.EventEmitter.emit [as $emit] (events.js:96:17)
    at SocketNamespace.handlePacket (/home/signalmaster/signalmaster/node_modules/socket.io/lib/namespace.js:335:22)
    at Manager.onClientMessage (/home/signalmaster/signalmaster/node_modules/socket.io/lib/manager.js:488:38)
    at WebSocket.Transport.onMessage (/home/signalmaster/signalmaster/node_modules/socket.io/lib/transport.js:387:20)
    at Parser.<anonymous> (/home/signalmaster/signalmaster/node_modules/socket.io/lib/transports/websocket/hybi-16.js:39:10)
    at Parser.EventEmitter.emit (events.js:96:17)
    at opcodeHandlers.1.finish (/home/signalmaster/signalmaster/node_modules/socket.io/lib/transports/websocket/hybi-16.js:288:16)
    at Parser.opcodeHandlers.1.expectData [as expectHandler] (/home/signalmaster/signalmaster/node_modules/socket.io/lib/transports/websocket/hybi-16.js:299:15)
    at Parser.add (/home/signalmaster/signalmaster/node_modules/socket.io/lib/transports/websocket/hybi-16.js:466:24)
HenrikJoreteg commented 11 years ago

closed by making sure the callback is not just defined but always a function before calling it: https://github.com/andyet/signalmaster/commit/c3e8ea7dfff656b4a344d3394cb0f5715b40a891