Reanimate dead socket

This commit is contained in:
Adrian Wozniak 2020-04-06 23:03:13 +02:00
parent 3b91151f3e
commit 033b5d9640

View File

@ -23,6 +23,9 @@ import("../pkg/index.js").then(module => {
const array = new Uint8Array(arrayBuffer); const array = new Uint8Array(arrayBuffer);
module.handle_ws_message(array); module.handle_ws_message(array);
}; };
ws.onclose = () => {
setTimeout(() => buildWebSocket(), 600);
};
}; };
buildWebSocket(); buildWebSocket();