Skip to content

Commit 952921f

Browse files
authored
fix(tailscale): a slow tailscale status no longer hides Tailscale in Settings (#21057)
1 parent ca4d583 commit 952921f

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎packages/tailscale/src/tailscale.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ describe("tailscale", () => {
323323
assert.equal(error.executable, "tailscale");
324324
assert.equal(error.subcommand, "status");
325325
assert.equal(error.argumentCount, 2);
326-
assert.equal(error.timeoutMs, 1_500);
326+
assert.equal(error.timeoutMs, 3_500);
327327
assert.isTrue(Cause.isTimeoutError(error.cause));
328-
assert.equal(error.message, "tailscale status timed out after 1500ms.");
328+
assert.equal(error.message, "tailscale status timed out after 3500ms.");
329329
}).pipe(Effect.provide(layer));
330330
});
331331

‎packages/tailscale/src/tailscale.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ import { HttpClient, HttpClientRequest } from "effect/http";
88
import { ChildProcess, ChildProcessSpawner } from "effect/process";
99

1010
export const DEFAULT_TAILSCALE_SERVE_PORT = 443;
11-
export const TAILSCALE_STATUS_TIMEOUT = Duration.millis(1_500);
11+
/**
12+
* Bounds `tailscale status` and `tailscale debug prefs`. Allows the 1.8-2.6 s
13+
* `tailscale status` has been measured at when T3 Code spawns it on Windows.
14+
* A CLI that never answers takes longer than this to fail, because the kill
15+
* that follows the timeout also takes time (`taskkill` on Windows).
16+
*/
17+
export const TAILSCALE_STATUS_TIMEOUT = Duration.millis(3_500);
1218
const TAILSCALE_SERVE_TIMEOUT = Duration.seconds(10);
1319
const TAILSCALE_PROBE_TIMEOUT = Duration.millis(2_500);
1420

0 commit comments

Comments
 (0)