Do not need to flush stream allocator events. (#2577)

This commit is contained in:
Raja Subramanian
2024-03-14 04:36:19 +05:30
committed by GitHub
parent 4e96ad2e5b
commit e376625a13
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -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)
})
+1 -1
View File
@@ -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{