Improve STUN resolution error message

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.
This commit is contained in:
Kristian Paradis
2024-04-16 10:10:31 -04:00
committed by Sean DuBois
parent 6f743e393f
commit ad0240747d
+2 -2
View File
@@ -465,7 +465,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
}
@@ -532,7 +532,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
}