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

Merge branch 'patch-1' of https://github.com/Raynos/node_redis into Raynos-patch-1

This commit is contained in:
Bryce Baril
2014-07-10 21:10:17 -07:00

View File

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