-3

I need to design a web app that has a constant server connection, but the connection keeps failing.

9pfs
  • 560
  • 5
  • 17
  • You answering your own question isn't a reason why this isn't a dupe. It's a pretty clear dupe actually – Zoe Mar 14 '21 at 22:24
  • @Anonymous - these comments are not suggestions - they are automatically posted on behalf of users voting to close questions as duplicates. SE wanted curation actions to appear "friendlier", but just added to the confusion. You should not get too worried by dupe closures - the serve an important role of guiding *others* to well-known / time-tested / detailed Q&As with a lot of good info on the subject. – Oleg Valter is with Ukraine Mar 15 '21 at 01:45

1 Answers1

-1

You just have to use the following javaScript: webSocket.onclose=webSocket.open;. You can use webSocket.onclose=undefined; to force a connection to close.

9pfs
  • 560
  • 5
  • 17