From c18b2cd21b4267226c769c126c9d463713fe1a97 Mon Sep 17 00:00:00 2001 From: mlsmaycon Date: Mon, 22 Dec 2025 15:50:19 +0100 Subject: [PATCH] rename chan --- client/internal/dns/mgmt/mgmt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/internal/dns/mgmt/mgmt.go b/client/internal/dns/mgmt/mgmt.go index ceb73101a..d01be0c2c 100644 --- a/client/internal/dns/mgmt/mgmt.go +++ b/client/internal/dns/mgmt/mgmt.go @@ -168,11 +168,11 @@ func (m *Resolver) AddDomain(ctx context.Context, d domain.Domain) error { func lookupIPWithExtraTimeout(ctx context.Context, d domain.Domain) ([]netip.Addr, error) { log.Infof("looking up IP for mgmt domain=%s", d.SafeString()) defer log.Infof("done looking up IP for mgmt domain=%s", d.SafeString()) - errChan := make(chan *ipsResponse, 1) + resultChan := make(chan *ipsResponse, 1) go func() { ips, err := net.DefaultResolver.LookupNetIP(ctx, "ip", d.PunycodeString()) - errChan <- &ipsResponse{ + resultChan <- &ipsResponse{ err: err, ips: ips, } @@ -186,7 +186,7 @@ func lookupIPWithExtraTimeout(ctx context.Context, d domain.Domain) ([]netip.Add return nil, fmt.Errorf("timed out waiting for ips to be available for domain %s", d.SafeString()) case <-ctx.Done(): return nil, ctx.Err() - case resp = <-errChan: + case resp = <-resultChan: } if resp.err != nil {