fix: detect Tailscale for App Store CLI path and hung status checks#406
fix: detect Tailscale for App Store CLI path and hung status checks#406
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 143715e4f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let output = timeout(TAILSCALE_COMMAND_TIMEOUT, async { | ||
| tailscale_command(binary.as_os_str()) | ||
| .arg("version") | ||
| .output() | ||
| .await |
There was a problem hiding this comment.
Terminate tailscale child process when timeout elapses
resolve_tailscale_binary now wraps Command::output() in tokio::time::timeout, but when the deadline fires the future is dropped without killing/reaping the spawned process (Tokio Command defaults to kill_on_drop(false)), so a hung tailscale/launchctl invocation continues in the background even though this call returns; repeated checks can accumulate stray processes and eventually exhaust process slots. The same timeout pattern is also used in tailscale_status, so both call paths should explicitly kill/reap on timeout (or enable kill_on_drop(true)).
Useful? React with 👍 / 👎.
…when-tailscale-alre
Motivation
.../MacOS/tailscalepath and the code referenced the wrong-cased path.tailscaleCLI could leave the frontend request hanging and the “Checking…” button disabled indefinitely.Description
/Applications/Tailscale.app/Contents/MacOS/tailscaleand adjusted the missing-binary message to reference the corrected path insrc-tauri/src/tailscale/mod.rs.TAILSCALE_COMMAND_TIMEOUT(12s) and applied it totailscale version(binary resolution) andtailscale status --jsoncalls so slow or hung CLI calls return with an explicit timeout error.Testing
npm run typecheckwhich completed successfully.cd src-tauri && cargo fmtto format changes locally.cd src-tauri && cargo checkwhich failed in this container due to missing systemglib-2.0/pkg-configsetup unrelated to the change, so full Rust build verification could not complete here.Codex Task