From 6df8d0f47cab62dcd034bc146ac1fda993824fe3 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Tue, 20 Feb 2024 15:43:19 +0100 Subject: [PATCH] fix(cluster): fix count in fetchSockets() method Related: https://github.com/socketio/socket.io-redis-adapter/commit/bd32763043a2eb79a21dffd8820f20e598348adf --- lib/cluster-adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cluster-adapter.ts b/lib/cluster-adapter.ts index 5c8f3bc..4b4f214 100644 --- a/lib/cluster-adapter.ts +++ b/lib/cluster-adapter.ts @@ -515,7 +515,7 @@ export abstract class ClusterAdapter extends Adapter { ]); const expectedResponseCount = serverCount - 1; - if (opts.flags?.local || expectedResponseCount === 0) { + if (opts.flags?.local || expectedResponseCount <= 0) { return localSockets; }