Do not need to flush stream allocator events. (#2577)
This commit is contained in:
@@ -91,7 +91,7 @@ func (d *DynacastManager) Restart() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *DynacastManager) Close() {
|
func (d *DynacastManager) Close() {
|
||||||
d.qualityNotifyOpQueue.Stop()
|
<-d.qualityNotifyOpQueue.Stop()
|
||||||
|
|
||||||
d.lock.Lock()
|
d.lock.Lock()
|
||||||
dqs := d.getDynacastQualitiesLocked()
|
dqs := d.getDynacastQualitiesLocked()
|
||||||
@@ -305,9 +305,11 @@ func (d *DynacastManager) enqueueSubscribedQualityChange() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d.params.Logger.Debugw("subscribedMaxQualityChange",
|
d.params.Logger.Debugw(
|
||||||
|
"subscribedMaxQualityChange",
|
||||||
"subscribedCodecs", subscribedCodecs,
|
"subscribedCodecs", subscribedCodecs,
|
||||||
"maxSubscribedQualities", maxSubscribedQualities)
|
"maxSubscribedQualities", maxSubscribedQualities,
|
||||||
|
)
|
||||||
d.qualityNotifyOpQueue.Enqueue(func() {
|
d.qualityNotifyOpQueue.Enqueue(func() {
|
||||||
d.onSubscribedMaxQualityChange(subscribedCodecs, maxSubscribedQualities)
|
d.onSubscribedMaxQualityChange(subscribedCodecs, maxSubscribedQualities)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ func NewStreamAllocator(params StreamAllocatorParams) *StreamAllocator {
|
|||||||
}),
|
}),
|
||||||
rateMonitor: NewRateMonitor(),
|
rateMonitor: NewRateMonitor(),
|
||||||
videoTracks: make(map[livekit.TrackID]*Track),
|
videoTracks: make(map[livekit.TrackID]*Track),
|
||||||
eventsQueue: utils.NewOpsQueue("stream-allocator", 64, true),
|
eventsQueue: utils.NewOpsQueue("stream-allocator", 64, false),
|
||||||
}
|
}
|
||||||
|
|
||||||
s.probeController = NewProbeController(ProbeControllerParams{
|
s.probeController = NewProbeController(ProbeControllerParams{
|
||||||
|
|||||||
Reference in New Issue
Block a user