fix(server): report shutdown progress instead of a silent 8s wait - #123
Merged
Merged
Conversation
Ctrl+C looked like a hang: Stop blocks up to 8s while odek serve runs its graceful teardown with no user-visible feedback. Stop() now emits StopStopping/StopEscalated via an OnStopEvent callback, and the CLI prints a stderr indicator for the graceful wait and the SIGKILL escalation. Stop also waits for the kill to land so it never returns with a live child.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bodek | 2b7c492 | Commit Preview URL Branch Preview URL |
Sep 18 2026, 05:47 AM |
Setpgid does not exist in windows' syscall.SysProcAttr; the escalation fixture now calls tagged fixturePgroup/fixtureGroupKill helpers that are no-ops on windows (the escalation test already skips there via watchdog.Supported()).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
server.Conn.Stop()emitsStopStopping/StopEscalatedvia a newOnStopEventcallbackStopnow waits for the kill to land (never returns with a live child)Why
Ctrl+C blocks up to 8s while
odek servetears down gracefully — with zero feedback it reads as a hang.Tests
RED-first:
internal/server/stop_event_test.gocovers the graceful path (one event) and the escalation path (both events, ordered). Fullmake fmt vet lint testgate green locally.