From ad0240747d7a83c524a88b592ea8a41020292147 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 e97fe43..ec6831c 100644 --- a/gather.go +++ b/gather.go @@ -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 }