mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix webrtc _connected.
This commit is contained in:
parent
53a78140ea
commit
e78ee758c5
@ -455,15 +455,13 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||
}
|
||||
|
||||
private onDisconnected(error?: Error) {
|
||||
const wasConnected = this._connected
|
||||
this.disconnect()
|
||||
|
||||
if (!this._connected) {
|
||||
return
|
||||
}
|
||||
|
||||
if (wasConnected) {
|
||||
this._log.info(`disconnected`, { error })
|
||||
this.emit('disconnected', error)
|
||||
this._connected = false
|
||||
}
|
||||
}
|
||||
|
||||
private statsEmitter(ms: number = 2000) {
|
||||
|
Loading…
Reference in New Issue
Block a user