pull-stream / stream-to-pull-stream

convert a node stream (classic or new) into a pull-stream
MIT License
30 stars 5 forks source link

Possible event handler leak #19

Open joepie91 opened 4 years ago

joepie91 commented 4 years ago

See https://github.com/pull-stream/stream-to-pull-stream/blob/3a06f5a0717930e62c7f6c300ceacd6dbfd80a5c/index.js#L35

Shouldn't that be removeListener instead of on? As it stands, it's just re-attaching the onClose handler a second time when it should be cleaning things up.

huahang commented 3 years ago

+1