Open staminna opened 8 years ago
Yeah my apps crashing and freezing up. Am using the stream function
This is more likely that your need to unlisten from the stream. You can set the max amount of listeners with emitter.getMaxListeners() and emitter.setMaxListeners()
However I would suggest when your done with an event listener you remove it and init it again when needed.
Can you give us some sample code in a gist or code
block?
I'm going to close this issue due to it's age, but if you'd like to continue with it feel free to reopen.
:wave: I'm getting this issue as well. We could set emitter.setMaxListeners
but I believe this is happening within the node module and not within our personally written code, right?
I am not using streams, fyi.
Thanks again :)
Hi. I seem to have a memory leak in the stream function
(node) warning: possible EventEmitter memory leak detected. 11 data listeners added. Use emitter.setMaxListeners() to increase limit. -- Called from events.js:235:17(function EventEmitter.addListener)logMsg @ client.js:63(anonymous function) @ client.js:97c.emit @ socket.io.js:2c.onPacket @ socket.io.js:2d.onPacket @ socket.io.js:2c.onPacket @ socket.io.js:2c.onData @ socket.io.js:2websocket.onmessage @ socket.io.js:2 client.js:63 Trace at EventEmitter.addListener (events.js:239:17) at Namespace. (/Applications/MAMP/htdocs/wit.ai/project/tweetplugin.js:59:16)
at emitOne (events.js:77:13)
at Namespace.emit (events.js:169:7)
at Namespace.emit (/Applications/MAMP/htdocs/wit.ai/project/node_modules/socket.io/lib/namespace.js:206:10)
at /Applications/MAMP/htdocs/wit.ai/project/node_modules/socket.io/lib/namespace.js:174:14
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13) -- Called from console.js:80:8(function Console.trace)
tweetplugin.js:59:
'stream.on('data', function(tweet)'
What does this mean?