Closed Azerothian closed 13 years ago
/socket.io/0.6.16/ must be 0.6.17
We thought this issue was closed and fixed but it seems that there may be more to it.
I noticed when updating from socket.io 0.6.16 -> 0.6.17 it cut down the frequency of occurrance drastically, yet it still did happen now and then.
I am experiencing this too especially when using xhr polling . I believe this is purely a socket.io issue though
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace: at Socket. (events.js:123:17)
at [object Object]. (/usr/local/lib/node/.npm/socket.io/0.6.16/package/lib/socket.io/client.js:83:20)
at [object Object]._onConnect (/usr/local/lib/node/.npm/socket.io/0.6.16/package/lib/socket.io/transports/xhr-polling.js:23:35)
at [object Object].check (/usr/local/lib/node/.npm/socket.io/0.6.16/package/lib/socket.io/listener.js:77:12)
at HTTPServer. (/usr/local/lib/node/.npm/socket.io/0.6.16/package/lib/socket.io/listener.js:33:14)
at HTTPServer.emit (events.js:67:17)
at HTTPParser.onIncoming (http.js:1108:12)
at HTTPParser.onHeadersComplete (http.js:108:31)
at Socket.ondata (http.js:1007:22)
at Socket._onReadable (net.js:677:27)
-- Modules --
socket.io@0.6.17
nowjs 0.5.1
express
jade
----- app.js ------ var util = require('util');
var express = require('express');
var app = module.exports = express.createServer();
var users = {};
// Configuration
app.configure(function(){ app.set('views', dirname + '/views'); app.set('view engine', 'jade'); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(app.router); app.use(express.static(dirname + '/public')); });
app.configure('development', function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); });
app.configure('production', function(){ app.use(express.errorHandler()); });
// Routes
app.get('/', function(req, res){ res.render('index', { pageTitle: 'Nadir' }); });
// Only listen on $ node app.js
if (!module.parent) { app.listen(80); console.log("Express server listening on port %d", app.address().port);
} function userConnected(user, userName) { user.now.name = userName; users[user.user.clientId] = user; everyone.now.receiveStatusMessage( userName + " has connected."); sendUserList(); }
function userDisconnected(user) { everyone.now.receiveStatusMessage( user.now.name + " has disconnected."); delete users[user.user.clientId]; sendUserList(); }
function sendUserList() { var userDetailList = {};
}