Created
July 3, 2012 15:33
-
-
Save bentaber/3040500 to your computer and use it in GitHub Desktop.
EventEmitter + Domains bug when 'domain' property is set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var events = require('events'); | |
var util = require('util'); | |
var Emitter = function() { | |
this.domain = 'abc.com'; | |
}; | |
util.inherits(Emitter, events.EventEmitter); | |
var emitter = new Emitter(); | |
emitter.on('test', function() { | |
console.log('success'); | |
}); | |
emitter.emit('test'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment