mkozjak / node-telnet-client

A simple telnet client for Node.js
Other
350 stars 97 forks source link

Memory leak when using event-emitter interface #217

Open Page- opened 2 years ago

Page- commented 2 years ago

With the introduction of https://github.com/mkozjak/node-telnet-client/commit/ce2bb8e17483d2f93b70a5a0b61309d597f1943d by @kshetline it means that all data is stored in the pendingData property and is only removed when you use the nextData() interface which means that if you instead use the event-emitter interface, eg .on('data', ...) then pendingData will grow indefinitely

mkozjak commented 2 years ago

Nice find! Able to fix this asap so Balena doesn't need to be downgraded?

Page- commented 2 years ago

I do plan to look into a fix but first I need to resolve the issue for balena

mkozjak commented 2 years ago

Thanks so much, @Page- !