Tri-state probe signal. (#3229)
Need tri-state to indicate inconslusive, congeting and clearing. Currently, no special treatment for inconclusive, but for future use.
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/sfu/bwe"
|
||||
"github.com/livekit/livekit-server/pkg/sfu/ccutils"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/livekit/protocol/utils/mono"
|
||||
@@ -225,8 +226,8 @@ func (p *ProbeController) MaybeFinalizeProbe() (ccutils.ProbeClusterInfo, bool)
|
||||
return p.pci, true
|
||||
}
|
||||
|
||||
func (p *ProbeController) ProbeCongestionSignal(isCongesting bool) {
|
||||
if isCongesting {
|
||||
func (p *ProbeController) ProbeSignal(probeSignal bwe.ProbeSignal) {
|
||||
if probeSignal == bwe.ProbeSignalCongesting {
|
||||
// wait longer till next probe
|
||||
p.probeInterval = time.Duration(p.probeInterval.Seconds()*p.params.Config.BackoffFactor) * time.Second
|
||||
if p.probeInterval > p.params.Config.MaxInterval {
|
||||
|
||||
Reference in New Issue
Block a user