mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-17 14:52:15 +00:00
fix socket is null if PWA is offline
This commit is contained in:
@@ -139,10 +139,12 @@ class ServerConnection {
|
||||
|
||||
_disconnect() {
|
||||
this.send({ type: 'disconnect' });
|
||||
this._socket.onclose = null;
|
||||
this._socket.close();
|
||||
this._socket = null;
|
||||
Events.fire('ws-disconnected');
|
||||
if (this._socket) {
|
||||
this._socket.onclose = null;
|
||||
this._socket.close();
|
||||
this._socket = null;
|
||||
Events.fire('ws-disconnected');
|
||||
}
|
||||
}
|
||||
|
||||
_onDisconnect() {
|
||||
|
||||
Reference in New Issue
Block a user