I need to design a web app that has a constant server connection, but the connection keeps failing.
You just have to use the following javaScript: webSocket.onclose=webSocket.open;
. You can use webSocket.onclose=undefined;
to force a connection to close.