Skip to content

Commit bb7845d

Browse files
authored
Disable readOnly for cluster s/pubsub client (#2950)
1 parent 86480aa commit bb7845d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/client/lib/cluster/cluster-slots.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ export default class RedisClusterSlots<
518518
node = index < this.masters.length ?
519519
this.masters[index] :
520520
this.replicas[index - this.masters.length],
521-
client = this.#createClient(node, index >= this.masters.length);
521+
client = this.#createClient(node, false);
522522

523523
this.pubSubNode = {
524524
address: node.address,
@@ -563,7 +563,7 @@ export default class RedisClusterSlots<
563563
}
564564

565565
async #initiateShardedPubSubClient(master: MasterNode<M, F, S, RESP, TYPE_MAPPING>) {
566-
const client = this.#createClient(master, true)
566+
const client = this.#createClient(master, false)
567567
.on('server-sunsubscribe', async (channel, listeners) => {
568568
try {
569569
await this.rediscover(client);

0 commit comments

Comments
 (0)