Original removeListener is not executed
Closed this issue · 2 comments
santigimeno commented
In this code:
var longjohn = require('longjohn');
var EventEmitter = require('events').EventEmitter;
var ee = new EventEmitter();
ee.on('removeListener', function(event, listener) {
console.log('removeListener: ' + event);
});
ee.on('data', function() {
});
ee.removeAllListeners('data');
The removeListener is never executed, while without longjohn it is. Is it expected or a bug?
Thanks!
mattinsler commented
What version of node are you running? This is probably a bug in how removeAllListeners is implemented (since it's written on top of the real EventEmitter implementation).
santigimeno commented
@mattinsler It's happening in the latest stable: 0.10.33