Skip to content

tailcat: close all backend resources - #19

Open
0xcadams wants to merge 3 commits into
tailscale:mainfrom
0xcadams:0xcadams/tailcat-lifecycle
Open

tailcat: close all backend resources#19
0xcadams wants to merge 3 commits into
tailscale:mainfrom
0xcadams:0xcadams/tailcat-lifecycle

Conversation

@0xcadams

@0xcadams 0xcadams commented Aug 29, 2026

Copy link
Copy Markdown

What

Makes Tailcat shutdown fully release the in-process networking backend, including active netstack connections.

Why

locoBackend.Close currently closes only the WireGuard engine and network monitor. The gVisor netstack, dialer, and event bus remain alive, so an accepted TCP connection can stay blocked after Server.Close and repeated ephemeral Tailcat instances retain resources.

Changes

  • Add a regression test using a local DERP and STUN relay with an active TCP connection during shutdown.
  • Close every backend-owned resource in dependency order.
  • Ensure closing the netstack unblocks active connection handlers before shutdown returns.

@0xcadams
0xcadams marked this pull request as ready for review August 29, 2026 00:31
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