Skip to content

Commit

Permalink
Stun -> STUN for Config Entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-Der committed Apr 3, 2024
1 parent edaa25e commit c1e4dd1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions agent_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const (
// defaultRelayAcceptanceMinWait is the wait time before nominating a relay candidate
defaultRelayAcceptanceMinWait = 2000 * time.Millisecond

// defaultStunGatherTimeout is the wait time for STUN responses
defaultStunGatherTimeout = 5 * time.Second
// defaultSTUNGatherTimeout is the wait time for STUN responses
defaultSTUNGatherTimeout = 5 * time.Second

// defaultMaxBindingRequests is the maximum number of binding requests before considering a pair failed
defaultMaxBindingRequests = 7
Expand Down Expand Up @@ -139,8 +139,8 @@ type AgentConfig struct {
PrflxAcceptanceMinWait *time.Duration
// HostAcceptanceMinWait specify a minimum wait time before selecting relay candidates
RelayAcceptanceMinWait *time.Duration
// StunGatherTimeout specify a minimum wait time for STUN responses
StunGatherTimeout *time.Duration
// STUNGatherTimeout specify a minimum wait time for STUN responses
STUNGatherTimeout *time.Duration

// Net is the our abstracted network interface for internal development purpose only
// (see https://github.com/pion/transport)
Expand Down Expand Up @@ -227,10 +227,10 @@ func (config *AgentConfig) initWithDefaults(a *Agent) {
a.relayAcceptanceMinWait = *config.RelayAcceptanceMinWait
}

if config.StunGatherTimeout == nil {
a.stunGatherTimeout = defaultStunGatherTimeout
if config.STUNGatherTimeout == nil {
a.stunGatherTimeout = defaultSTUNGatherTimeout
} else {
a.stunGatherTimeout = *config.StunGatherTimeout
a.stunGatherTimeout = *config.STUNGatherTimeout
}

if config.TCPPriorityOffset == nil {
Expand Down

0 comments on commit c1e4dd1

Please sign in to comment.