mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-21 15:26:17 -04:00
Add will-change
This commit is contained in:
parent
3ac40fb3d7
commit
600d3551f4
2 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ class ServerConnection {
|
|||
}
|
||||
|
||||
_connect() {
|
||||
clearTimeout(this._reconnectTimer);
|
||||
if (this._isConnected() || this._isConnecting()) return;
|
||||
const ws = new WebSocket(this._endpoint());
|
||||
ws.binaryType = 'arraybuffer';
|
||||
|
@ -17,7 +18,6 @@ class ServerConnection {
|
|||
ws.onclose = e => this._onDisconnect();
|
||||
ws.onerror = e => console.error(e);
|
||||
this._socket = ws;
|
||||
clearTimeout(this._reconnectTimer);
|
||||
}
|
||||
|
||||
_isConnected() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue