nodejs / readable-stream

Node-core streams for userland
https://nodejs.org/api/stream.html
Other
1.03k stars 227 forks source link

Wrong listener removed? #322

Closed arj03 closed 6 years ago

arj03 commented 6 years ago

Grepping through code to find memory leaks this line looks suspicious:

https://github.com/nodejs/readable-stream/blob/master/lib/_stream_readable.js#L597

Should that be 'unpipe'?

mcollina commented 6 years ago

No, https://github.com/nodejs/readable-stream/blob/master/lib/_stream_readable.js#L561-L562. It is added to the 'end' listener, not 'unpipe'.