1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

check process.domain is STILL currDomain

This commit is contained in:
Raynos
2014-04-18 13:57:35 -07:00
parent 7d61feb411
commit d34308ea4c

View File

@@ -573,9 +573,10 @@ function try_callback(client, callback, reply) {
callback(null, reply);
} catch (err) {
if (process.domain) {
process.domain.emit('error', err);
if (process.domain) {
process.domain.exit();
var currDomain = process.domain;
currDomain.emit('error', err);
if (process.domain === currDomain) {
currDomain.exit();
}
} else {
client.emit("error", err);