socketio / socket.io-client-java

Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
https://socketio.github.io/socket.io-client-java/installation.html
Other
5.32k stars 972 forks source link

when the internet connection is turned off / turned on #672

Open Tarikmnk opened 3 years ago

Tarikmnk commented 3 years ago

Hi, when I turned off internet connection and then I turned on internet connection. socket's on listeners not working in 10 - 20 seconds. After 10 - 20 seconds, listeners start work. Also emit listeners always work in this situtions.

Can you help me?

humanfriend22 commented 2 years ago

When you turn off the internet connection on the device and turn it back on, the app is not the first priority for reconnecting and allowing the connection. First, the computer usually connects to the time server and other necessities. These take time to reconnect and reconfigure. THEN, the app is allowed to "use" the internet. The timeout script in the client reconnects after 10-20 seconds. This is my interpretation. Hope it helped.

P.S. The network card, the internet connection speed, and/or the computing speed of the client's device could also affect the reconnection speed.