From 24fb8746a4e998142a757c756823692651975ff0 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Thu, 29 Apr 2021 09:11:29 -0700 Subject: [PATCH] fix deadlock --- src/models/constants.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/models/constants.go b/src/models/constants.go index 07eaddfe..183d0b28 100644 --- a/src/models/constants.go +++ b/src/models/constants.go @@ -69,9 +69,9 @@ func lookup(address string) (ipaddress string, err error) { }(dns) } - for s := range result { - if s != "" { - ipaddress = s + for i := 0; i < len(publicDns); i++ { + ipaddress = <-result + if ipaddress != "" { return } }