mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
webrtc statsStop in diesconnect function.
This commit is contained in:
parent
37b0a82167
commit
53a78140ea
@ -306,6 +306,11 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||
this._peer = undefined
|
||||
}
|
||||
|
||||
if (this._statsStop && typeof this._statsStop === 'function') {
|
||||
this._statsStop()
|
||||
this._statsStop = undefined
|
||||
}
|
||||
|
||||
this._track = undefined
|
||||
this._state = 'disconnected'
|
||||
this._connected = false
|
||||
@ -459,11 +464,6 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||
this._log.info(`disconnected`, { error })
|
||||
this.emit('disconnected', error)
|
||||
this._connected = false
|
||||
|
||||
if (this._statsStop && typeof this._statsStop === 'function') {
|
||||
this._statsStop()
|
||||
this._statsStop = undefined
|
||||
}
|
||||
}
|
||||
|
||||
private statsEmitter(ms: number = 2000) {
|
||||
|
Loading…
Reference in New Issue
Block a user