mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-06 10:20:26 +02:00
webrtc force close all.
This commit is contained in:
parent
5f07d5aa87
commit
15e369da33
1 changed files with 5 additions and 8 deletions
|
@ -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._channel = undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
|
this._peer = undefined
|
||||||
|
this._channel = undefined
|
||||||
this._state = 'disconnected'
|
this._state = 'disconnected'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue