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() {
if (this.connected) {
try {
this._peer!.close()
} catch (err) {}
this._peer = undefined
this._channel = undefined
}
this._state = 'disconnected'
}