Skip to content

Commit 782d333

Browse files
committed
Merge branch 'patch-1' of https://github.com/Raynos/node_redis into Raynos-patch-1
2 parents 8e9c5d4 + d34308e commit 782d333

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)