-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird socket.io / EventEmitter issue #1136
Comments
So you're saying that this: If you could provide a link to your source, that would be really helpful. |
@danmmx sorry for the delay. This issue is not with your A good place to do that might be here ( module.exports = function(socketio) {
// socket.io (v1.x.x) is powered by debug.
...
socketio.on('connection', function(socket) {
socket.setMaxListeners(20); // Set the client's socket.io EE to max listeners: 20
// socket.setMaxListeners(0); // Set the client's socket.io EE to max listeners: unlimited
socket.address =
socket.handshake.address !== null ?
socket.handshake.address.address + ':' + socket.handshake.address.port :
process.env.DOMAIN;
...
}; |
Thanks a lot @kingcody , I thought with the config on each model's EventEmitter was enough. This fixed it. |
No problem, glad to hear it (: |
While running my server, I might have a lot of objects listening on socket.io (not perfectly sure how it works, 2nd time implementing it) and I'm having this
that line is the one having
socket.on('disconnect' …
herebut the event emitter already has this
SaleProductEvents.setMaxListeners(0);
onsaleProduct.events.js
so not sure what could I be doing wrong.The text was updated successfully, but these errors were encountered: