easternbloc / node-stomp-client

A STOMP client for Node.js
Other
93 stars 47 forks source link

memory leak in eventemitter #50

Closed den1zk closed 9 years ago

den1zk commented 9 years ago

I was testing the package by publishing and subscribing on my own. I was publishing data every 2000 milliseconds and then the following warning appeared on console.

(node) warning: possible EventEmitter memory leak detected. 11 MESSAGE listeners added. Use emitter.setMaxListeners() to increase limit. Trace at StompFrameEmitter.addListener (events.js:179:15) at StompClient.onConnect (/Users/deniz/WebstormProjects/crm-sync/node_modules/stomp-client/lib/client.js:199:16) at Socket.emit (events.js:104:17) at TCPConnectWrap.afterConnect as oncomplete

I inspected the memory usage with "top" command and then realized that memory leak was actually real.