maccman/juggernaut

latest socket.io update throws node error

Opened this issue · 2 comments

debug - set close timeout for client 8742131551014762006
warn - client not handshaken client should reconnect
info - transport end
debug - cleared close timeout for client 8742131551014762006
debug - discarding transport
debug - setting request GET /socket.io/1/xhr-polling/472935549180658144?t1311297173968
debug - setting poll timeout
debug - clearing poll timeout
debug - xhr-polling writing 7:::1+0
debug - set close timeout for client 472935549180658144
warn - client not handshaken client should reconnect
info - transport end
debug - cleared close timeout for client 472935549180658144
debug - discarding transport
debug - xhr-polling received data packet �69�3:::{"type":"subscribe","channel":"ce750cb608619b9d14d50"}�3�0::
21 Jul 20:12:56 - Received: {"type":"subscribe","channel":"ce750cb608619b9d14d50"}
21 Jul 20:12:56 - Client subscribing to: ce750cb608619b9d14d50
debug - xhr-polling received data packet �69�3:::{"type":"subscribe","channel":"ce750cb608619b9d14d50"}�3�0::
debug - got disconnection packet
info - transport end by forced client disconnection
info - transport end
debug - cleared close timeout for client 17337047622115684384
debug - discarding transport

/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/manager.js:466
this.rooms[room].splice(this.rooms[room].indexOf(id), 1);
^
TypeError: Cannot call method 'indexOf' of undefined
at Manager.onDisconnect (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/manager.js:466:48)
at Manager.onClientDisconnect (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/manager.js:428:8)
at XHRPolling. (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/transport.js:467:20)
at XHRPolling.end (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/transports/http-polling.js:133:38)
at XHRPolling.onForcedDisconnect (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/transport.js:208:10)
at XHRPolling.onMessage (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/transport.js:360:17)
at XHRPolling.onData (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/transports/http.js:89:10)
at IncomingMessage. (/data/u/apps/newap/shared/node_modules/juggernaut/node_modules/socket.io/lib/transports/http.js:57:12)
at IncomingMessage.emit (events.js:61:17)
at HTTPParser.onMessageComplete (http.js:133:23)

getting the same error when a client disconnects. Seems pretty reproducible.

updating to socket.io master fixes this issue, so it should be fixed once 0.7.8 is out.