diff --git a/WebSocketClient/src/main.ts b/WebSocketClient/src/main.ts index fc2936d..84a46dd 100644 --- a/WebSocketClient/src/main.ts +++ b/WebSocketClient/src/main.ts @@ -85,6 +85,11 @@ const createWebSocket = (url: string): WebSocket => { createWebSocket(url); }); }; + webSocket.onclose = () => { + setTimeout(() => { + createWebSocket(url); + }, 500); + } return webSocket; };