You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
Disable readOnly for cluster s/pubsub client (#2950)
This commit is contained in:
@@ -518,7 +518,7 @@ export default class RedisClusterSlots<
|
||||
node = index < this.masters.length ?
|
||||
this.masters[index] :
|
||||
this.replicas[index - this.masters.length],
|
||||
client = this.#createClient(node, index >= this.masters.length);
|
||||
client = this.#createClient(node, false);
|
||||
|
||||
this.pubSubNode = {
|
||||
address: node.address,
|
||||
@@ -563,7 +563,7 @@ export default class RedisClusterSlots<
|
||||
}
|
||||
|
||||
async #initiateShardedPubSubClient(master: MasterNode<M, F, S, RESP, TYPE_MAPPING>) {
|
||||
const client = this.#createClient(master, true)
|
||||
const client = this.#createClient(master, false)
|
||||
.on('server-sunsubscribe', async (channel, listeners) => {
|
||||
try {
|
||||
await this.rediscover(client);
|
||||
|
Reference in New Issue
Block a user