websocket reconnect on close with code 1006
<p>I am using javascript websocket and want it to reconnect onclose with code 1006.
I came across this</p>

<p><a href="https://stackoverflow.com/questions/3780511/reconnection-of-client-when-server-reboots-in-websocket">Reconnection of Client when server reboots in WebSocket</a></p>

<p>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.</p>

<p>The 20 seconds is just a number, the loss of connection could be server side issue or a client internet issue.</p>

<p>I hope I have been clear in describing the issue
Regards,
Shyam</p>