mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
webrtc force close all.
This commit is contained in:
parent
5f07d5aa87
commit
15e369da33
@ -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…
Reference in New Issue
Block a user