You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Add selected_db to the new redis instance if using client.duplicate
This commit is contained in:
4
index.js
4
index.js
@@ -141,7 +141,9 @@ RedisClient.prototype.duplicate = function (options) {
|
||||
for (var elem in options) { // jshint ignore: line
|
||||
existing_options[elem] = options[elem];
|
||||
}
|
||||
return new RedisClient(existing_options);
|
||||
var client = new RedisClient(existing_options);
|
||||
client.selected_db = this.selected_db;
|
||||
return client;
|
||||
};
|
||||
|
||||
RedisClient.prototype.initialize_retry_vars = function () {
|
||||
|
Reference in New Issue
Block a user