1
0
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 4.7 (#2951)

This commit is contained in:
Hristo Temelski
2025-05-08 10:29:12 +03:00
committed by GitHub
parent 2fc79bdfb3
commit e267dce19c

View File

@@ -535,7 +535,7 @@ export default class RedisClusterSlots<
this.pubSubNode = {
address: node.address,
client: this.#createClient(node, true)
client: this.#createClient(node, false)
.then(async client => {
if (toResubscribe) {
await Promise.all([
@@ -574,7 +574,7 @@ export default class RedisClusterSlots<
}
#initiateShardedPubSubClient(master: MasterNode<M, F, S>) {
const promise = this.#createClient(master, true)
const promise = this.#createClient(master, false)
.then(client => {
client.on('server-sunsubscribe', async (channel, listeners) => {
try {