exit downtrackRTCPWorker after disconnection
This commit is contained in:
@@ -841,6 +841,9 @@ func (p *ParticipantImpl) downTracksRTCPWorker() {
|
|||||||
for {
|
for {
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(5 * time.Second)
|
||||||
|
|
||||||
|
if p.State() == livekit.ParticipantInfo_DISCONNECTED {
|
||||||
|
return
|
||||||
|
}
|
||||||
if p.subscriber.pc.ConnectionState() != webrtc.PeerConnectionStateConnected {
|
if p.subscriber.pc.ConnectionState() != webrtc.PeerConnectionStateConnected {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user