Skip to content

Commit 6f5fe09

Browse files
committed
dns53/ipmapper: incr barrier ttl to 10s
1 parent 155fce3 commit 6f5fe09

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

intra/dialers/ips.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func For(hostOrIP string) []netip.Addr {
8383
// Resolve resolves hostname to IP addresses, bypassing cache.
8484
// If resolution fails, entries from the cache are returned, if any.
8585
func Resolve(hostname string) ([]netip.Addr, error) {
86+
// ipm.LookupNetIP itself has a short-term cache (ipmapper.go:battl)
8687
addrs, err := ipm.LookupNetIP(context.Background(), "ip", hostname)
8788
if len(addrs) <= 0 { // check cache
8889
if addrs = ipm.GetAny(hostname).Addrs(); len(addrs) > 0 {

intra/dns53/ipmapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/miekg/dns"
2525
)
2626

27-
const battl = 5 * time.Second
27+
const battl = 10 * time.Second
2828

2929
var (
3030
errNoHost = errors.New("no hostname")

0 commit comments

Comments
 (0)