Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added handler domain on event emitting

  • Loading branch information...
commit c482548524838a017466f7ea2b6ffb41e840eaf1 1 parent 3e0c0cd
Ovidiu Cherecheș authored July 05, 2012

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  lib/events.js
6  lib/events.js
@@ -79,6 +79,9 @@ EventEmitter.prototype.emit = function() {
79 79
     if (this.domain) {
80 80
       this.domain.enter();
81 81
     }
  82
+    if (handler.domain) {
  83
+      handler.domain.enter();
  84
+    }
82 85
     switch (arguments.length) {
83 86
       // fast cases
84 87
       case 1:
@@ -97,6 +100,9 @@ EventEmitter.prototype.emit = function() {
97 100
         for (var i = 1; i < l; i++) args[i - 1] = arguments[i];
98 101
         handler.apply(this, args);
99 102
     }
  103
+    if (handler.domain) {
  104
+      handler.domain.exit();
  105
+    }
100 106
     if (this.domain) {
101 107
       this.domain.exit();
102 108
     }

0 notes on commit c482548

Please sign in to comment.
Something went wrong with that request. Please try again.