Content-Length: 256664 | pFad | https://github.com/socketio/socket.io-redis-adapter/commit/bd32763043a2eb79a21dffd8820f20e598348adf

FC fix(sharded): fix count in fetchSockets() method (#523) · socketio/socket.io-redis-adapter@bd32763 · GitHub
Skip to content

Commit bd32763

Browse files
fix(sharded): fix count in fetchSockets() method (#523)
If `fetchSockets()` is called shortly after the adapter was initialized, the server count may still return 0, causing this to fail with "timeout reached: only 0 responses received out of -1".
1 parent ef5f0da commit bd32763

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cluster-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ export abstract class ClusterAdapter extends Adapter {
436436
]);
437437
const expectedResponseCount = serverCount - 1;
438438

439-
if (opts.flags?.local || expectedResponseCount === 0) {
439+
if (opts.flags?.local || expectedResponseCount <= 0) {
440440
return localSockets;
441441
}
442442

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/socketio/socket.io-redis-adapter/commit/bd32763043a2eb79a21dffd8820f20e598348adf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy