Skip to content

Commit 9459660

Browse files
authored
fix(pubsub): Fixed cluster client pubsub logic
* Infer the cluster pubsub client read only mode from the node type * Modify flag logic
1 parent 10ff6de commit 9459660

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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, true);
521+
client = this.#createClient(node, index >= this.masters.length);
522522

523523
this.pubSubNode = {
524524
address: node.address,

0 commit comments

Comments
 (0)