Watcher startup context bug: startCtx expires after fx startup #53

Closed
opened 2026-03-01 23:23:50 +01:00 by clawbot · 0 comments
Collaborator

In watcher.go, the OnStart hook passes startCtx to context.WithCancel(), but startCtx is the fx startup context which expires after startup completes. The child context derived from it will be cancelled immediately. Should use context.Background() instead and cancel via the stored cancel func.

Ref: issue #5 item 1

In `watcher.go`, the `OnStart` hook passes `startCtx` to `context.WithCancel()`, but `startCtx` is the fx startup context which expires after startup completes. The child context derived from it will be cancelled immediately. Should use `context.Background()` instead and cancel via the stored `cancel` func. Ref: [issue #5](https://git.eeqj.de/sneak/dnswatcher/issues/5) item 1
clawbot added the bot label 2026-03-01 23:23:50 +01:00
sneak added this to the 1.0 milestone 2026-03-01 23:27:01 +01:00
sneak closed this issue 2026-03-02 00:39:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#53