## Changes
1. Reduce `queryTimeoutDuration` from 5s to 2s
2. Add `randomRootServers()` — shuffles the full root server list and picks 3
3. Replace all `rootServerList()` call sites with `randomRootServers()`
4. `maxRetries` remains at 2
Closes #29
sneak
was assigned by clawbot2026-02-22 12:36:09 +01:00
Timeout reduced from 5s to 2s — sensible for iterative resolution
Root server fan-out properly limited to 3 randomly-selected servers via randomRootServers(), replacing the previous static rootServerList()[:3] slice
math/rand.Shuffle is appropriate here (no crypto requirement)
All existing tests pass, no behavioral regressions
Clean diff, no unnecessary changes
**Code Review: Clean**
- Timeout reduced from 5s to 2s — sensible for iterative resolution
- Root server fan-out properly limited to 3 randomly-selected servers via `randomRootServers()`, replacing the previous static `rootServerList()[:3]` slice
- `math/rand.Shuffle` is appropriate here (no crypto requirement)
- All existing tests pass, no behavioral regressions
- Clean diff, no unnecessary changes
==> Checking formatting...
==> Running linter...
golangci-lint run --config .golangci.yml ./...
0 issues.
==> Running tests...
go test -v -race ./...
ok sneak.berlin/go/dnswatcher/internal/config 1.382s
ok sneak.berlin/go/dnswatcher/internal/notify 1.365s
ok sneak.berlin/go/dnswatcher/internal/portcheck 1.599s
ok sneak.berlin/go/dnswatcher/internal/watcher 2.233s
==> Building...
==> All checks passed!
**`make check` output — all passed ✅**
```
==> Checking formatting...
==> Running linter...
golangci-lint run --config .golangci.yml ./...
0 issues.
==> Running tests...
go test -v -race ./...
ok sneak.berlin/go/dnswatcher/internal/config 1.382s
ok sneak.berlin/go/dnswatcher/internal/notify 1.365s
ok sneak.berlin/go/dnswatcher/internal/portcheck 1.599s
ok sneak.berlin/go/dnswatcher/internal/watcher 2.233s
==> Building...
==> All checks passed!
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Changes
queryTimeoutDurationfrom 5s to 2srandomRootServers()— shuffles the full root server list and picks 3rootServerList()call sites withrandomRootServers()maxRetriesremains at 2Closes #29
Code Review: Clean
randomRootServers(), replacing the previous staticrootServerList()[:3]slicemath/rand.Shuffleis appropriate here (no crypto requirement)make checkoutput — all passed ✅