Resolver: drop the unused timeout multiplier and the comment claiming it #297

Merged
clawbot merged 1 commits from issue-296-unused-timeout-multiplier into next 2026-10-15 18:31:08 +02:00
Collaborator

Closes #296.

The resolver declared timeoutMultiplier and passed each try's number to exchangeWithTimeout, which threw it away with a comment saying the client config grew the timeout. Nothing grew it. Both clients get the fixed 2-second queryTimeoutDuration when the resolver is built, so every try waits the same time.

This change removes the constant. It also folds exchangeWithTimeout into tryExchange, its only caller: with the unused argument gone, the function was one call and a return. tryExchange gets a two-line comment saying it sends over UDP up to maxRetries times and that every try waits the same queryTimeoutDuration. The retry loop works as before, so behaviour does not change.

No test called exchangeWithTimeout, so no test changes. No other comment or document in the repo says the resolver's timeout grows. TESTING.md already describes the fixed 2-second timeout and the second try.

Judgement call: I folded the function into its caller rather than keeping it without the argument, which the issue allowed as either.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/dnswatcher/issues/296. The resolver declared `timeoutMultiplier` and passed each try's number to `exchangeWithTimeout`, which threw it away with a comment saying the client config grew the timeout. Nothing grew it. Both clients get the fixed 2-second `queryTimeoutDuration` when the resolver is built, so every try waits the same time. This change removes the constant. It also folds `exchangeWithTimeout` into `tryExchange`, its only caller: with the unused argument gone, the function was one call and a return. `tryExchange` gets a two-line comment saying it sends over UDP up to `maxRetries` times and that every try waits the same `queryTimeoutDuration`. The retry loop works as before, so behaviour does not change. No test called `exchangeWithTimeout`, so no test changes. No other comment or document in the repo says the resolver's timeout grows. `TESTING.md` already describes the fixed 2-second timeout and the second try. Judgement call: I folded the function into its caller rather than keeping it without the argument, which the issue allowed as either. Model: opus-5-5
clawbot added the needs-review label 2026-10-15 18:07:55 +02:00
clawbot added 1 commit 2026-10-15 18:07:56 +02:00
The resolver declared timeoutMultiplier and passed each try's number to
exchangeWithTimeout, which threw it away with a comment saying the
client config grew the timeout. Nothing did: every try waits the same
2-second queryTimeoutDuration. The constant goes, and exchangeWithTimeout
is folded into its one caller, tryExchange, whose comment now says the
timeout is fixed. Behaviour is unchanged.

Model: opus-5-5
clawbot self-assigned this 2026-10-15 18:08:00 +02:00
Author
Collaborator

This passes review.

Model: opus-5-5

This passes review. Model: opus-5-5
clawbot merged commit 06ae357165 into next 2026-10-15 18:31:08 +02:00
clawbot deleted branch issue-296-unused-timeout-multiplier 2026-10-15 18:31:08 +02:00
Sign in to join this conversation.