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
But calling socket.io.reconnection(boolean) doesn't seem to have any effect.
To Reproduce
Socket.IO client version: 4.7.4
Client
import{io}from"socket.io-client";window.socket=io("ws://localhost:3000/",{});//Now stop your server and then after you see the reconnection attempts, try to disable the reconnections with:window.socket.io.reconnection(false);
Expected behavior
socket.io.reconnection(false); should stop the reconnection loop until I activate it again, as described in the docs.
Platform:
Device: PC
OS: Windows 10
Browser: Chrome 122
Additional context
I've noticed earlier that socket.io.reconnectionDelay(number) also seems to have no effect on an ongoing reconnection, however this is harder to tell due to the random factor.
And yes, I could call disconnect explicitly, but the maintenance mode doesn't necessarily mean that the websocket server is gone. I just want to prevent reconnections if it is gone, too.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to disable reconnection while my site is in maintenance mode. But socket.io keeps trying to reconnect.
Basically I'm doing this (those are redux selectors, not important for the issue):
But calling
socket.io.reconnection(boolean)
doesn't seem to have any effect.To Reproduce
Socket.IO client version:
4.7.4
Client
Expected behavior
socket.io.reconnection(false);
should stop the reconnection loop until I activate it again, as described in the docs.Platform:
Additional context
I've noticed earlier that
socket.io.reconnectionDelay(number)
also seems to have no effect on an ongoing reconnection, however this is harder to tell due to the random factor.And yes, I could call
disconnect
explicitly, but the maintenance mode doesn't necessarily mean that the websocket server is gone. I just want to prevent reconnections if it is gone, too.The text was updated successfully, but these errors were encountered: