Skip to content

fix(bin): graceful shutdown + deploy docs (TLS, tunnel verdict) - #19

Merged
rldyourmnd merged 2 commits into
mainfrom
fix/graceful-shutdown
Sep 22, 2026
Merged

rldyourmnd merged 2 commits into
mainfrom
fix/graceful-shutdown

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Summary

  • CLI: endpoint.close() on exit — rds id/ticket no longer log iroh's "ungraceful abort" error.
  • agent/server/relay: SIGINT+SIGTERM handling; agent closes the endpoint (peers get CONNECTION_CLOSE), servers call iroh_relay::Server::shutdown() (clean listener+websocket teardown under systemctl stop).
  • Docs: TLS-terminator recipe for 3340, Cloudflare Tunnel/WARP verdict, stale Documentation= URLs fixed.

Test plan

  • cargo build --locked --workspace --all-targets
  • fmt + clippy default and transport-noq,owned-relay lanes clean
  • rds-agent/rds-cli/rds-relay/rds-server tests green
  • rds id smoke: zero ERROR lines (previously logged ungraceful drop)

Generated with Devin

Short-lived CLI commands dropped the iroh endpoint without close(), so
iroh logged "Endpoint dropped without calling Endpoint::close" on every
rds id/ticket. The agent and both server binaries had no SIGTERM
handling at all: systemctl stop killed them mid-accept, peers saw an
abrupt socket death instead of CONNECTION_CLOSE, and relayed
websockets got a silent RST.

- rds-cli: endpoint.close() before exit.
- rds-agent: select accept loop vs SIGINT/SIGTERM, then close the
  endpoint so peers get CONNECTION_CLOSE.
- rds-server/rds-relay: same signal handling, then
  iroh_relay::Server::shutdown() to close listener + client sockets.
- Document the nginx/haproxy TLS-terminator option in front of 3340
  and why plaintext HTTP relaying is already safe (E2E payloads,
  EndpointId admission).
- Record the Cloudflare Tunnel/WARP verdict: directory could be
  tunnel-fronted, relay probably but edge reconnects drop attached
  endpoints, and no tunnel carries endpoint QUIC/UDP. VPS preferred.
- Fix stale Documentation= URL (rldyourmnd -> NDDev-OpenNetwork).
@rldyourmnd
rldyourmnd merged commit 3d14f51 into main Sep 22, 2026
12 checks passed
@rldyourmnd
rldyourmnd deleted the fix/graceful-shutdown branch September 22, 2026 17:06
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