Skip to content

fix(server): report shutdown progress instead of a silent 8s wait - #123

Merged
jkyberneees merged 2 commits into
mainfrom
fix/shutdown-progress-indicator
Sep 18, 2026
Merged

jkyberneees merged 2 commits into
mainfrom
fix/shutdown-progress-indicator

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

What

  • server.Conn.Stop() emits StopStopping / StopEscalated via a new OnStopEvent callback
  • CLI prints a stderr indicator: graceful-wait notice + SIGKILL escalation notice
  • Stop now waits for the kill to land (never returns with a live child)

Why

Ctrl+C blocks up to 8s while odek serve tears down gracefully — with zero feedback it reads as a hang.

Tests

RED-first: internal/server/stop_event_test.go covers the graceful path (one event) and the escalation path (both events, ordered). Full make fmt vet lint test gate green locally.

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.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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()).
@jkyberneees
jkyberneees merged commit 8639d5a into main Sep 18, 2026
9 checks passed
@jkyberneees
jkyberneees deleted the fix/shutdown-progress-indicator branch September 18, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant