From 033b5d9640f25ff4857020553f892bb858cf815c Mon Sep 17 00:00:00 2001 From: Adrian Wozniak Date: Mon, 6 Apr 2020 23:03:13 +0200 Subject: [PATCH] Reanimate dead socket --- jirs-client/js/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jirs-client/js/index.js b/jirs-client/js/index.js index 3762292c..d783fa7f 100644 --- a/jirs-client/js/index.js +++ b/jirs-client/js/index.js @@ -23,6 +23,9 @@ import("../pkg/index.js").then(module => { const array = new Uint8Array(arrayBuffer); module.handle_ws_message(array); }; + ws.onclose = () => { + setTimeout(() => buildWebSocket(), 600); + }; }; buildWebSocket();