Skip to content

Commit d34308e

Browse files
committed
check process.domain is STILL currDomain
1 parent 7d61feb commit d34308e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,10 @@ function try_callback(client, callback, reply) {
573573
callback(null, reply);
574574
} catch (err) {
575575
if (process.domain) {
576-
process.domain.emit('error', err);
577-
if (process.domain) {
578-
process.domain.exit();
576+
var currDomain = process.domain;
577+
currDomain.emit('error', err);
578+
if (process.domain === currDomain) {
579+
currDomain.exit();
579580
}
580581
} else {
581582
client.emit("error", err);

0 commit comments

Comments
 (0)