You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
UI autoreconnect and resume on lost connection
This commit is contained in:
@@ -222,7 +222,6 @@ function sendPingRequest() {
|
|||||||
|
|
||||||
// Automatic reconnection on WebSocket close
|
// Automatic reconnection on WebSocket close
|
||||||
if (socket.readyState === WebSocket.CLOSED || socket.readyState === WebSocket.CLOSING) {
|
if (socket.readyState === WebSocket.CLOSED || socket.readyState === WebSocket.CLOSING) {
|
||||||
console.log("Main/UI attempting to reconnect...", socketAddress);
|
|
||||||
socket = new WebSocket(socketAddress);
|
socket = new WebSocket(socketAddress);
|
||||||
|
|
||||||
socket.onopen = () => {
|
socket.onopen = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user