From 7aca89139eef00459874a332ef3f387d8e0498c2 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Sun, 15 Apr 2018 18:04:55 -0700 Subject: [PATCH] Stop trying to be clever and let the socket close normally --- Ooui/Client.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Ooui/Client.js b/Ooui/Client.js index 918a60e..4b1f998 100644 --- a/Ooui/Client.js +++ b/Ooui/Client.js @@ -37,16 +37,6 @@ const inputEvents = { keyup: true, }; -// Try to close the socket gracefully -window.onbeforeunload = function() { - if (socket != null) { - socket.close (1001, "Unloading page"); - socket = null; - console.log ("Web socket closed"); - } - return null; -} - function getSize () { return { height: window.innerHeight,