We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80b36bf commit 147fc46Copy full SHA for 147fc46
internal/verification/dns.go
@@ -291,7 +291,16 @@ func IsRetryableDNSError(err error) bool {
291
}
292
293
// Use iterative approach to prevent stack overflow with deeply nested errors
294
+ // Use iterative approach to prevent stack overflow with deeply nested errors
295
+ const maxIterations = 100
296
+ iterationCount := 0
297
for err != nil {
298
+ // Prevent infinite loop in case of circular error chain
299
+ if iterationCount >= maxIterations {
300
+ log.Printf("Exceeded maximum error unwrapping iterations (%d); possible circular error chain", maxIterations)
301
+ return false
302
+ }
303
+ iterationCount++
304
// Check for temporary network errors
305
var netErr *net.OpError
306
if errors.As(err, &netErr) {
0 commit comments