fix: retry on DNS timeout, distinguish authoritative negatives (closes #35)
Some checks failed
Check / check (pull_request) Failing after 6m4s
Some checks failed
Check / check (pull_request) Failing after 6m4s
- Add StatusTimeout constant for timeout responses - querySingleType now retries on timeout and SERVFAIL (3 attempts, exponential backoff starting at 100ms) - NXDOMAIN and NOERROR+empty are treated as authoritative negatives with no retry - classifyResponse sets structured error messages for timeout and SERVFAIL cases - Refactored into smaller functions to satisfy cyclomatic complexity limits
This commit is contained in:
@@ -17,6 +17,7 @@ const (
|
||||
StatusError = "error"
|
||||
StatusNXDomain = "nxdomain"
|
||||
StatusNoData = "nodata"
|
||||
StatusTimeout = "timeout"
|
||||
)
|
||||
|
||||
// MaxCNAMEDepth is the maximum CNAME chain depth to follow.
|
||||
|
||||
Reference in New Issue
Block a user