diff --git a/public/scripts/network.js b/public/scripts/network.js index 71ee034..f59c74f 100644 --- a/public/scripts/network.js +++ b/public/scripts/network.js @@ -7,7 +7,6 @@ class ServerConnection { constructor() { this._connect(); - Events.on('beforeunload', _ => this._disconnect()); Events.on('pagehide', _ => this._disconnect()); document.addEventListener('visibilitychange', _ => this._onVisibilityChange()); if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect()); diff --git a/public_included_ws_fallback/scripts/network.js b/public_included_ws_fallback/scripts/network.js index aa622e7..3f8e9db 100644 --- a/public_included_ws_fallback/scripts/network.js +++ b/public_included_ws_fallback/scripts/network.js @@ -5,7 +5,6 @@ class ServerConnection { constructor() { this._connect(); - Events.on('beforeunload', _ => this._disconnect()); Events.on('pagehide', _ => this._disconnect()); document.addEventListener('visibilitychange', _ => this._onVisibilityChange()); if (navigator.connection) navigator.connection.addEventListener('change', _ => this._reconnect());