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
How to realize disconnection reconnection? We now encounter the following scenario: After the server is restarted, the client loses its connection, and they cannot continue to communicate unless the client is restarted.
The text was updated successfully, but these errors were encountered:
When the websocket-server is restarted, the client will lose the connection with the server. If the reconnection mechanism is not introduced, the business data will not be updated in real time until the client is restarted manually. This is definitely not allowed in actual use, so the reconnection mechanism needs to be introduced. After snapping to the connection closing, try to reconnect.
The number of retries is 5, and the retry interval is 5s. The example code is as follows:
How to realize disconnection reconnection? We now encounter the following scenario: After the server is restarted, the client loses its connection, and they cannot continue to communicate unless the client is restarted.
The text was updated successfully, but these errors were encountered: