You've already forked node-redis
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:
6
index.js
6
index.js
@@ -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);
|
||||
|
Reference in New Issue
Block a user