mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
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:
@@ -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