Skip to content

Commit aa37fef

Browse files
committed
Merge branch 'Raynos-patch-1'
2 parents 8e9c5d4 + 782d333 commit aa37fef

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,11 @@ function try_callback(client, callback, reply) {
578578
callback(null, reply);
579579
} catch (err) {
580580
if (process.domain) {
581-
process.domain.emit('error', err);
582-
process.domain.exit();
581+
var currDomain = process.domain;
582+
currDomain.emit('error', err);
583+
if (process.domain === currDomain) {
584+
currDomain.exit();
585+
}
583586
} else {
584587
client.emit("error", err);
585588
}

0 commit comments

Comments
 (0)