fix: retry on DNS timeout, distinguish authoritative negatives (closes #35) #36
Reference in New Issue
Block a user
Delete Branch "fix/issue-35-retry-timeout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes #35 — resolver now distinguishes timeout from authoritative negative responses and retries on timeout/SERVFAIL.
Changes
StatusTimeoutconstant — distinct fromStatusErrorfor timeout casesquerySingleType— 3 attempts with exponential backoff (100ms, 200ms, 400ms) for:StatusNXDomainStatusNoDataNameserverResponse.Errorfield populated with descriptive messages for timeout and SERVFAILErrSERVFAILsentinel error for proper static error handlingDesign
Refactored
querySingleTypeinto smaller functions (querySingleTypeWithRetry,recordRetryFailure,handleDNSResponse,waitBackoff) to keep cyclomatic complexity within limits.make checkpasses with 0 issues — see comment below.make checkoutputAll 30 resolver tests pass. No linter issues. Build succeeds.
Closing — superseded by #37 which is rebased against current main.
Pull request closed