java-android-websocket-client icon indicating copy to clipboard operation
java-android-websocket-client copied to clipboard

Reconnect after time out does not work

Open Mrey3000 opened this issue 4 years ago • 3 comments

I added enableAutomaticReconnection(5000) but after i get this exception (System.err: tech.gusavila92.websocketclient.exceptions.InvalidServerHandshakeException: Invalid status code. Expected 101, received: 503) the web socket does not retry to connect after 5000ms

Mrey3000 avatar Nov 29 '21 17:11 Mrey3000

this client does not try to reconnect if the handshake fails, only after a succesful connection when the internet becomes unstable and the connection is dropped. This is left for a future enhancement

gusavila92 avatar Jun 15 '22 20:06 gusavila92

this client does not try to reconnect if the handshake fails, only after a succesful connection when the internet becomes unstable and the connection is dropped. This is left for a future enhancement

any update? if the client connects successfully one time, and then disconnects => reconnects => gets a handshake error it doesnt reconnect again and it can be really annoying if the proxy to the server returns a 502 when the server is down

gamer0mega avatar Jul 08 '24 15:07 gamer0mega

and even if i catch the exception, and try to use the connect method with a timer, the client simply does not even try to connect again

gamer0mega avatar Jul 08 '24 15:07 gamer0mega