Skip to content

Commit e3fb72f

Browse files
kparadisSean-Der
authored andcommitted
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.
1 parent 62795f0 commit e3fb72f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gather.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ func (a *Agent) gatherCandidatesSrflxUDPMux(ctx context.Context, urls []*stun.UR
400400
hostPort := fmt.Sprintf("%s:%d", url.Host, url.Port)
401401
serverAddr, err := a.net.ResolveUDPAddr(network, hostPort)
402402
if err != nil {
403-
a.log.Debugf("Failed to resolve STUN host: %s: %v", hostPort, err)
403+
a.log.Debugf("Failed to resolve STUN host: %s %s: %v", network, hostPort, err)
404404
return
405405
}
406406

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

0 commit comments

Comments
 (0)