Replies: 1 comment
-
The client will not attempt a reconnection if the server issues an explicit disconnect. The reconnection support is intended for interruptions. One option that you have is to disable the reconnections completely and handle all disconnections yourself. Another option is to use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to make my client as resilient as possible to disconnects, and it seems I've covered all the accidental disconnects. However, when the server disconnects the socket corresponding to this particular client, it fires the 'disconnect' event and simply exits the program. I would handle the reconnect myself in the disconnect, but I have no way of knowing if the client disconnected unexpectedly and the library will handle reconnecting, or if the client was kicked and the library has no intention of reconnecting.
Here is the python output when it was disconnected from the socketio server:
And for reference, here is the node.js code powering the server that is disconnecting me:
I believe this is the expected behavior from the library. What modifications can I make to reconnect when kicked from the server?
Beta Was this translation helpful? Give feedback.
All reactions