Stop trying to be clever and let the socket close normally

This commit is contained in:
Frank A. Krueger 2018-04-15 18:04:55 -07:00
parent 3612c855cf
commit 7aca89139e
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
1 changed files with 0 additions and 10 deletions

View File

@ -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,