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

Don't bind the RedisClient to the domain; callback should suffice.

This commit is contained in:
Forrest L Norvell
2012-10-15 11:02:04 -07:00
parent 0b6870be5c
commit e7099717aa

View File

@@ -755,11 +755,7 @@ RedisClient.prototype.send_command = function (command, args, callback) {
throw new Error("send_command: second argument must be an array");
}
if (callback && process.domain) {
callback = process.domain.bind(callback);
// ensure that any unhandled error events emitted by the client are scoped to the correct domain
process.domain.add(this);
}
if (callback && process.domain) callback = process.domain.bind(callback);
// if the last argument is an array and command is sadd or srem, expand it out:
// client.sadd(arg1, [arg2, arg3, arg4], cb);