mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 11:32:27 +00:00
BWE reset for probing. (#3295)
This commit is contained in:
1 parent
ac43e8a640
commit
238333985b
1 file changed
+7
-2
@@ -688,12 +688,15 @@ func (s *StreamAllocator) handleSignalFeedback(event Event) {
|
||||
}
|
||||
|
||||
func (s *StreamAllocator) handleSignalPeriodicPing(Event) {
|
||||
// if pause is allowed, there may be no packets sent and BWE could be congested state,
|
||||
// if pause is allowed, there may be no packets sent and BWE could be in congested state,
|
||||
// reset BWE if that persists for a while
|
||||
if s.state == streamAllocatorStateDeficient && s.params.Pacer.TimeSinceLastSentPacket() > s.params.Config.PausedMinWait {
|
||||
if s.allowPause && s.state == streamAllocatorStateDeficient && s.params.BWE.CongestionState() != bwe.CongestionStateNone && s.params.Pacer.TimeSinceLastSentPacket() > s.params.Config.PausedMinWait {
|
||||
s.params.Logger.Infow("stream allocator: resetting bwe to enable probing")
|
||||
s.maybeStopProbe()
|
||||
s.params.BWE.Reset()
|
||||
|
||||
// as BWE is reset, there is no finalizing for active cluster, so reset active cluster id
|
||||
s.activeProbeClusterId = ccutils.ProbeClusterIdInvalid
|
||||
}
|
||||
|
||||
if s.activeProbeClusterId != ccutils.ProbeClusterIdInvalid {
|
||||
@@ -872,6 +875,8 @@ func (s *StreamAllocator) setState(state streamAllocatorState) {
|
||||
s.maybeStopProbe()
|
||||
|
||||
s.params.BWE.Reset()
|
||||
|
||||
s.activeProbeClusterId = ccutils.ProbeClusterIdInvalid
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user