mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
potential fix for reconnect function
This commit is contained in:
parent
0436a2185a
commit
0b45bdfd84
1 changed files with 3 additions and 2 deletions
|
@ -73,7 +73,7 @@ class ServerConnection {
|
||||||
console.log('WS: server disconnected');
|
console.log('WS: server disconnected');
|
||||||
Events.fire('notify-user', 'Connection lost. Retry in 5 seconds...');
|
Events.fire('notify-user', 'Connection lost. Retry in 5 seconds...');
|
||||||
clearTimeout(this._reconnectTimer);
|
clearTimeout(this._reconnectTimer);
|
||||||
this._reconnectTimer = setTimeout(this._connect, 5000);
|
this._reconnectTimer = setTimeout(_ => this._connect(), 5000);
|
||||||
Events.fire('disconnect');
|
Events.fire('disconnect');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,8 +94,9 @@ class ServerConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onError(e) {
|
_onError(e) {
|
||||||
|
console.log("_onError")
|
||||||
console.error(e);
|
console.error(e);
|
||||||
this._connect();
|
// this._connect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue