mirror of
https://github.com/livekit/livekit.git
synced 2026-05-24 19:05:36 +00:00
Prevent subscription after participant close. (#1182)
This commit is contained in:
@@ -1949,6 +1949,11 @@ func (p *ParticipantImpl) onAnyTransportNegotiationFailed() {
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) EnqueueSubscribeTrack(trackID livekit.TrackID, isRelayed bool, f func(sub types.LocalParticipant) error) {
|
||||
// do not queue subscription is participant is already closed/disconnected
|
||||
if p.isClosed.Load() || p.State() == livekit.ParticipantInfo_DISCONNECTED {
|
||||
return
|
||||
}
|
||||
|
||||
p.params.Logger.Debugw("queuing subscribe", "trackID", trackID, "relayed", isRelayed)
|
||||
|
||||
p.supervisor.UpdateSubscription(trackID, true)
|
||||
|
||||
Reference in New Issue
Block a user