You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stream: Readable().removeAllListeners() not work #20923
const{Socket}=require('net')consts=newSockets.on('data',()=>{})s.removeAllListeners()s.listenerCount('data')// 0 expected, but got 1
If there is no arguments for stream::removeAllListeners(), the argument to be passed into Stream.prototype.removeAllListeners will be undefined, see here
The undefined value causes that the events::removeAllListeners(undefined) will do nothing. see here
Activity
apapirovski commentedon May 24, 2018
@kaelzhang Looks like a bug indeed. Feel free to open a PR if you would like or if not, hopefully someone else will.
stream: fix removeAllListeners() for Stream.Readable
Node socket.removeAllListeners() without name doesn't work
stream: fix removeAllListeners() for Stream.Readable