You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public async sockets(rooms: Set<Room>): Promise<Set<SocketId>> {
}
It's possible for getNumSub to return 0. In this case no response will be received and adapter will fail with error.
This could happen in situation where you have only one server active (i.e. all others are down) and want to immediately get clients list (and redis is not ready yet).
It will end with "timeout reached while waiting for clients response".
[edit] I was also planning to provive PR for version 5.4.X, but seems there is no branch for that.
[edit2] Handling getNumSub === 1 is much more trickier. It needs to find out it it's current instance connected or other one, so I didn't touch it with this PR.
It's possible for getNumSub to return 0. In this case no response will be received and adapter will fail with error.
This could happen in situation where you have only one server active (i.e. all others are down) and want to immediately get clients list (and redis is not ready yet).
It will end with "timeout reached while waiting for clients response".
Sample repro:
This can be of course fixed by doing it this way:
but I guess it should be handled cleanly in library.
I guess the best resolution would be that sockets resolve promise immediately when getNumSub === 0.
The text was updated successfully, but these errors were encountered: