fix(tunnel): make tailscale probes non-blocking to prevent UI freeze
Convert isTailscaleLoggedIn to cached non-blocking getter and turn isTailscaleRunningStrict / isTailscaleLoggedInStrict into async execAsync probes. The status poll no longer blocks the event loop, so dashboard navigation stays responsive while tunnel/tailscale checks run. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c5815ad3f0
commit
289214a2ea
4 files changed
+49
-17
No files matched your search
@@ -173,7 +173,7 @@ async function safeRestartTailscale(reason) {
|
||||
|
||||
// Tailscale daemon is OS-level with built-in reconnect; trust it when running (even on netchange).
|
||||
// Startup uses strict probe — cached state is cold after process/dev reload.
|
||||
const running = reason === "startup" ? isTailscaleRunningStrict() : isTailscaleRunning();
|
||||
const running = reason === "startup" ? await isTailscaleRunningStrict() : isTailscaleRunning();
|
||||
if (running) return;
|
||||
|
||||
const force = FORCE_RESTART_REASONS.test(reason);
|
||||
|
||||
Reference in new issue
Block a user