Skip to content

fix(relay): log shutdown errors instead of swallowing#407

Merged
intendednull merged 1 commit into
mainfrom
claude/issue-159-relay-shutdown-log
Apr 27, 2026
Merged

fix(relay): log shutdown errors instead of swallowing#407
intendednull merged 1 commit into
mainfrom
claude/issue-159-relay-shutdown-log

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Why

relay_server.shutdown().await.ok() swallowed errors. I/O fail, already-closed socket, anything — invisible. No log, no signal. Bad for observability.

Fix

Replace .ok() with if let Err(e) + tracing::warn!(%e, ...). Shutdown still non-fatal — relay process exits regardless — but failure now surfaces in logs. Matches existing tracing::error!(%e, ...) style nearby (lines 227-228).

Swept relay crate for .shutdown().await.ok() and .ok(); — only one site found. No other instances in scope.

Verify

  • cargo fmt --check -p willow-relay clean
  • cargo clippy -p willow-relay --all-targets -- -D warnings clean
  • cargo test -p willow-relay 17 tests pass

Closes #159


Generated by Claude Code

`.shutdown().await.ok()` hid I/O errors. Replace with
`if let Err(e)` + `tracing::warn!`. Non-fatal but observable.

Closes #159
@intendednull intendednull merged commit 73482d8 into main Apr 27, 2026
7 checks passed
@intendednull intendednull deleted the claude/issue-159-relay-shutdown-log branch April 27, 2026 09:23
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.

[relay] Shutdown errors silently swallowed with .ok()

2 participants