test: Disable CNAME lookup caching
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
PapaTutuWawa committed 2024-01-06 19:53:03 +01:00
1 parent cb40a0689b
commit be42e60731
1 file changed
-6
-6
View File
@@ -1,7 +1,6 @@
package dns
import (
"errors"
"net"
"strings"
"time"
@@ -59,10 +58,6 @@ func LookupRepoTXT(domain string) (string, error) {
func LookupCNAME(domain string) (string, error) {
cname, found := cnameCache.Get(domain)
if found {
if cname == "" {
return "", errors.New("Previous request failure")
}
return cname.(string), nil
}
@@ -72,6 +67,5 @@ func LookupCNAME(domain string) (string, error) {
return cname.(string), nil
}
cnameCache.Set(domain, "", cache.DefaultExpiration)
return "", err
}