From 5f1228cee7abe6b81e16e7a442ed1010cbec09ca Mon Sep 17 00:00:00 2001 From: NingWang Date: Sun, 20 Sep 2020 22:07:16 +0800 Subject: [PATCH] Update redisProtocol.js support multiple Redis servers connection with auth. // like this config const redisConfig = { protocol: 'redis', pack: 'redis', unpack: 'redis', balance: 'random', protocol: 'redis', server:[ { host: '10.x.x.1.', port: 8379, password: '123abc' }, { host: '10.x.x.2, port: 8379, password: 'abc123' }, ...more ] }; --- lib/ext/protocol/redisProtocol.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ext/protocol/redisProtocol.js b/lib/ext/protocol/redisProtocol.js index 12ec71a..866fc6d 100644 --- a/lib/ext/protocol/redisProtocol.js +++ b/lib/ext/protocol/redisProtocol.js @@ -43,6 +43,7 @@ RedisProtocol.prototype.normalizeConfig = RedisProtocol.normalizeConfig = functi RedisProtocol.prototype.createClient = function(config) { config.redisConf.host = config.server.host; config.redisConf.port = config.server.port; + config.redisConf.password = config.server.password; var configKey = this.getConfigKey(config); var client; if (!clientCache[configKey] || config.noClientCache) {