-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client reconnect to server doesn't function as instructed. #1067
Comments
I have same issue too. |
+1 |
I have this issue also. Has anyone found a workaround to reconnect. I get the 'reconnect' event but the connection is not established. Calling open() or connect() hasn't helped. Also the timeout value doesn't seem to correlate to actual timeout at least when running on Android/iOS webview (Angular2 webapp). Socket disconnects after latest 2-3min of inactivity even my timeout on client side is set to 18000000 (30min if I'm not mistaken). |
@ethernetweb you should be able to reconnect manually with I guess it makes sense not to automatically reconnect by default, since it is a deliberate action from the server. |
Yes you might be right, thanks. I managed to connect manually after idle disconnect. Like about so: Init =>
----- subscribe to disconnect event ------
----- subscribe to connect event to do your magic ------
|
after rebooting my master server, the client server reconnect is not called and calling after disconnecting and calling connect manually does not connect, same problem as @kmyllyvi |
@bogdancochioras could you please open a new issue and provide some code reproducing the issue please? Closing this one, see my answer below. |
Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Current behaviour
I hesitate to bring up what appears to be an old issue that was resolved but I'm now experiencing it in a new version.
I have a socket.io server and a socket.io-client
Both version 1.7.2
When the server calls socket.disconnect(), the client will disconnect but not reconnect, even with the option of reconnection:true
I have attempted to use a disconnect handler client-side to call socket.io.reconnect() but this does nothing.
The socket object reports skipReconnect = true after being disconnected by the server.
Server side disconnect event: server namespace disconnect
Client side disconnect event: io server disconnect
Steps to reproduce (if the current behaviour is a bug)
https://github.com/ethernetweb/socket.io-fiddle/
Note: the best way to get a quick answer is to provide a failing test case, by forking the following fiddle for example.
Expected behaviour
With the option of reconnection:true, client should attempt a reconnect with established socket object within the reconnectionDelay time-frame.
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered: