Files
tailscale/cmd
codingetandClaude 0a6e85834a fix(tsconnect): keep racing the runtime while the IPN is built
Two lifecycle gaps in startIPN, both found in review.

The runtime was only raced until the readiness callback fired. Building
the backend happens after that, in a Go goroutine, and if the runtime
dies partway through, that goroutine dies with it and the promise it
would have settled never settles. startIPN hung forever instead of
rejecting. Race the factory too.

createIPN also handed callers the bridge's own shutdown, whose promise
races the runtime tearing itself down and may never settle, and which
the public type did not declare at all. Replace it in place with one that
resolves when the runtime has actually exited, and declare it. Replacing
rather than wrapping keeps the object the bridge built, instead of a copy
that only looks like it.

That also gives the exit handler the distinction it was missing: only an
exit the caller did not ask for is a panic now, so a deliberate shutdown
is no longer reported as one.

Co-Authored-By: claude-opus-5 <noreply@anthropic.com>
2026-08-30 15:30:28 +00:00
..
2026-07-10 14:26:11 -07:00
2026-07-10 14:26:11 -07:00
2026-07-10 14:26:11 -07:00
2026-07-10 14:26:11 -07:00