From a34c5d6147fe0b21f24eb82be0163da3440b0006 Mon Sep 17 00:00:00 2001 From: Kristian Paradis Date: Mon, 15 Apr 2024 13:58:34 -0400 Subject: [PATCH] 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. --- gather.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gather.go b/gather.go index 024247d2..3ca8086e 100644 --- a/gather.go +++ b/gather.go @@ -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 } @@ -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 }