Skip to content

Instantly share code, notes, and snippets.

@rich97
Created August 4, 2011 10:59
Show Gist options
  • Save rich97/1124964 to your computer and use it in GitHub Desktop.
Save rich97/1124964 to your computer and use it in GitHub Desktop.
// SERVER
var gameSet = new GameSet();
var io = require('socket.io')
, express = require('express')
, app = express.createServer();
app.listen(8080);
var sio = io.listen(app);
sio.sockets.on('connection', function(socket) {});
// CLIENT
var game = io.connect('http://localhost:8080');
game.on('connect', function(socket) {});
// ERROR
/home/richard/code/webroot/js/node/club_footie_node/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 (/home/richard/code/webroot/js/node/club_footie_node/node_modules/socket.io/lib/manager.js:466:48)
at Manager.onClientDisconnect (/home/richard/code/webroot/js/node/club_footie_node/node_modules/socket.io/lib/manager.js:428:8)
at WebSocket.end (/home/richard/code/webroot/js/node/club_footie_node/node_modules/socket.io/lib/transport.js:467:20)
at WebSocket.onSocketEnd (/home/richard/code/webroot/js/node/club_footie_node/node_modules/socket.io/lib/transport.js:147:8)
at Socket.<anonymous> (native)
at Socket.emit (events.js:61:17)
at Socket._onReadable (net.js:658:51)
at IOWatcher.onReadable [as callback] (net.js:177:10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment