diff --git a/public/scripts/network.js b/public/scripts/network.js index 75fb9b0..2bf52c8 100644 --- a/public/scripts/network.js +++ b/public/scripts/network.js @@ -53,7 +53,7 @@ class ServerConnection { _onPairDeviceJoin(roomKey) { if (!this._isConnected()) { - setTimeout(_ => this._onPairDeviceJoin(roomKey), 5000); + setTimeout(_ => this._onPairDeviceJoin(roomKey), 1000); return; } this.send({ type: 'pair-device-join', roomKey: roomKey }) @@ -161,7 +161,7 @@ class ServerConnection { console.log('WS: server disconnected'); Events.fire('notify-user', 'Connecting..'); clearTimeout(this._reconnectTimer); - this._reconnectTimer = setTimeout(_ => this._connect(), 5000); + this._reconnectTimer = setTimeout(_ => this._connect(), 1000); Events.fire('ws-disconnected'); this._isReconnect = true; } diff --git a/public_included_ws_fallback/scripts/network.js b/public_included_ws_fallback/scripts/network.js index 392c53f..6f40723 100644 --- a/public_included_ws_fallback/scripts/network.js +++ b/public_included_ws_fallback/scripts/network.js @@ -51,7 +51,7 @@ class ServerConnection { _onPairDeviceJoin(roomKey) { if (!this._isConnected()) { - setTimeout(_ => this._onPairDeviceJoin(roomKey), 5000); + setTimeout(_ => this._onPairDeviceJoin(roomKey), 1000); return; } this.send({ type: 'pair-device-join', roomKey: roomKey }) @@ -171,7 +171,7 @@ class ServerConnection { console.log('WS: server disconnected'); Events.fire('notify-user', 'Connecting..'); clearTimeout(this._reconnectTimer); - this._reconnectTimer = setTimeout(_ => this._connect(), 5000); + this._reconnectTimer = setTimeout(_ => this._connect(), 1000); Events.fire('ws-disconnected'); this._isReconnect = true; }