From a36219e48a676bb784c68bd67f86a34062fd3661 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 f93e6c16..5efb999c 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 }