Skip to content

Commit

Permalink
Improve STUN resolution error message
Browse files Browse the repository at this point in the history
Add network to resolve stun host error message
Most error message in gatherCandidatesSrflx and
gatherCandidatesSrflxUDPMux include the network in
them but not the one when failing to Resolve the host.
  • Loading branch information
kparadis authored and Sean-Der committed Aug 15, 2024
1 parent 62795f0 commit e3fb72f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gather.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ func (a *Agent) gatherCandidatesSrflxUDPMux(ctx context.Context, urls []*stun.UR
hostPort := fmt.Sprintf("%s:%d", url.Host, url.Port)
serverAddr, err := a.net.ResolveUDPAddr(network, hostPort)
if err != nil {
a.log.Debugf("Failed to resolve STUN host: %s: %v", hostPort, err)
a.log.Debugf("Failed to resolve STUN host: %s %s: %v", network, hostPort, err)
return
}

Expand Down Expand Up @@ -462,7 +462,7 @@ func (a *Agent) gatherCandidatesSrflx(ctx context.Context, urls []*stun.URI, net
hostPort := fmt.Sprintf("%s:%d", url.Host, url.Port)
serverAddr, err := a.net.ResolveUDPAddr(network, hostPort)
if err != nil {
a.log.Debugf("Failed to resolve STUN host: %s: %v", hostPort, err)
a.log.Debugf("Failed to resolve STUN host: %s %s: %v", network, hostPort, err)
return
}

Expand Down

0 comments on commit e3fb72f

Please sign in to comment.