You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-12-11 09:22:35 +03:00
fix(sentinel): properly pass reconnectStrategy (#3063)
Properly pass reconnectStrategy to master/replica nodes. Before that strategies passed in the nodeClientOptions.socket object were ignored. fixes #3061
This commit is contained in:
committed by
GitHub
parent
d5423b93d6
commit
e347d566cb
@@ -716,7 +716,7 @@ class RedisSentinelInternal<
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#createClient(node: RedisNode, clientOptions: RedisClientOptions, reconnectStrategy?: undefined | false) {
|
#createClient(node: RedisNode, clientOptions: RedisClientOptions, reconnectStrategy?: false) {
|
||||||
return RedisClient.create({
|
return RedisClient.create({
|
||||||
//first take the globally set RESP
|
//first take the globally set RESP
|
||||||
RESP: this.#RESP,
|
RESP: this.#RESP,
|
||||||
@@ -726,7 +726,7 @@ class RedisSentinelInternal<
|
|||||||
...clientOptions.socket,
|
...clientOptions.socket,
|
||||||
host: node.host,
|
host: node.host,
|
||||||
port: node.port,
|
port: node.port,
|
||||||
reconnectStrategy
|
...(reconnectStrategy !== undefined && { reconnectStrategy })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user