diff --git a/src/component/internal/webrtc.ts b/src/component/internal/webrtc.ts index 4c71c34a..bfd0a51c 100644 --- a/src/component/internal/webrtc.ts +++ b/src/component/internal/webrtc.ts @@ -150,15 +150,12 @@ export class NekoWebRTC extends EventEmitter { } public disconnect() { - if (this.connected) { - try { - this._peer!.close() - } catch (err) {} - - this._peer = undefined - this._channel = undefined - } + try { + this._peer!.close() + } catch (err) {} + this._peer = undefined + this._channel = undefined this._state = 'disconnected' }