summaryrefslogtreecommitdiff
path: root/src/node.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-03-09 07:00:21 -0800
committerisaacs <i@izs.me>2013-03-09 07:00:21 -0800
commit80472bc301234d9dc4142e62bbffc4300fffdd83 (patch)
tree21303e63f897fd85740e0b054eddd56af8480489 /src/node.js
parent4d1e9e537029806cf873f21e41e92830c757e5cf (diff)
downloadnode-80472bc301234d9dc4142e62bbffc4300fffdd83.tar.gz
domain: Fix double-exit on nested domains
Minor oversight in fix for #4953.
Diffstat (limited to 'src/node.js')
-rw-r--r--src/node.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node.js b/src/node.js
index 9d6e75eef..49aedaee0 100644
--- a/src/node.js
+++ b/src/node.js
@@ -258,7 +258,9 @@
// The domain error handler threw! oh no!
// See if another domain can catch THIS error,
// or else crash on the original one.
- domainStack.pop();
+ // If the user already exited it, then don't double-exit.
+ if (domain === domainModule.active)
+ domainStack.pop();
if (domainStack.length) {
var parentDomain = domainStack[domainStack.length - 1];
process.domain = domainModule.active = parentDomain;