I am using javascript websocket and want it to reconnect onclose with code 1006. I came across this
Reconnection of Client when server reboots in WebSocket
the accepted answer there does work but after 20 seconds when the server reconnects the number of attempted connections rise to 4 and the user receives 4 messages which was actually sent only once.
The 20 seconds is just a number, the loss of connection could be server side issue or a client internet issue.
I hope I have been clear in describing the issue Regards, Shyam