ipv6 fixes

This commit is contained in:
Ben Sarmiento
2024-01-11 02:35:02 +01:00
parent 9e3d12b008
commit b526da1b4f
2 changed files with 2 additions and 1 deletions

View File

@@ -132,6 +132,7 @@ func NewHTTPClient(token string, maxRetries int, timeoutSecs int, restrictToHost
restrictToHostsLen := len(restrictToHosts)
randomHost := restrictToHosts[rand.Intn(restrictToHostsLen)]
host = randomHost
address = net.JoinHostPort(host, port)
}
}
ips, err := net.DefaultResolver.LookupIPAddr(ctx, host)