Stop trying to be clever and let the socket close normally
This commit is contained in:
parent
3612c855cf
commit
7aca89139e
|
@ -37,16 +37,6 @@ const inputEvents = {
|
||||||
keyup: true,
|
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 () {
|
function getSize () {
|
||||||
return {
|
return {
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
|
|
Loading…
Reference in New Issue