diff --git a/pkg/rtc/dynacastmanager.go b/pkg/rtc/dynacastmanager.go index 0fed210ce..20b35cb81 100644 --- a/pkg/rtc/dynacastmanager.go +++ b/pkg/rtc/dynacastmanager.go @@ -91,7 +91,7 @@ func (d *DynacastManager) Restart() { } func (d *DynacastManager) Close() { - d.qualityNotifyOpQueue.Stop() + <-d.qualityNotifyOpQueue.Stop() d.lock.Lock() dqs := d.getDynacastQualitiesLocked() @@ -305,9 +305,11 @@ func (d *DynacastManager) enqueueSubscribedQualityChange() { } } - d.params.Logger.Debugw("subscribedMaxQualityChange", + d.params.Logger.Debugw( + "subscribedMaxQualityChange", "subscribedCodecs", subscribedCodecs, - "maxSubscribedQualities", maxSubscribedQualities) + "maxSubscribedQualities", maxSubscribedQualities, + ) d.qualityNotifyOpQueue.Enqueue(func() { d.onSubscribedMaxQualityChange(subscribedCodecs, maxSubscribedQualities) }) diff --git a/pkg/sfu/streamallocator/streamallocator.go b/pkg/sfu/streamallocator/streamallocator.go index 6370692b0..beda5f10a 100644 --- a/pkg/sfu/streamallocator/streamallocator.go +++ b/pkg/sfu/streamallocator/streamallocator.go @@ -180,7 +180,7 @@ func NewStreamAllocator(params StreamAllocatorParams) *StreamAllocator { }), rateMonitor: NewRateMonitor(), videoTracks: make(map[livekit.TrackID]*Track), - eventsQueue: utils.NewOpsQueue("stream-allocator", 64, true), + eventsQueue: utils.NewOpsQueue("stream-allocator", 64, false), } s.probeController = NewProbeController(ProbeControllerParams{