webrtc force close all.

This commit is contained in:
Miroslav Šedivý 2021-02-08 22:32:33 +01:00
parent 5f07d5aa87
commit 15e369da33

View File

@ -150,15 +150,12 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
} }
public disconnect() { public disconnect() {
if (this.connected) {
try { try {
this._peer!.close() this._peer!.close()
} catch (err) {} } catch (err) {}
this._peer = undefined this._peer = undefined
this._channel = undefined this._channel = undefined
}
this._state = 'disconnected' this._state = 'disconnected'
} }