From 9459660d960bb015b67d4bdf80f20672d85cb1ed Mon Sep 17 00:00:00 2001 From: Hristo Temelski Date: Wed, 30 Apr 2025 15:57:01 +0300 Subject: [PATCH] fix(pubsub): Fixed cluster client pubsub logic * Infer the cluster pubsub client read only mode from the node type * Modify flag logic --- packages/client/lib/cluster/cluster-slots.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/lib/cluster/cluster-slots.ts b/packages/client/lib/cluster/cluster-slots.ts index 3a4adff73c..c2fde197f4 100644 --- a/packages/client/lib/cluster/cluster-slots.ts +++ b/packages/client/lib/cluster/cluster-slots.ts @@ -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, true); + client = this.#createClient(node, index >= this.masters.length); this.pubSubNode = { address: node.address,