From 8906bee23e27850c6e214e8c11d62c9315071dbe Mon Sep 17 00:00:00 2001 From: James Pine Date: Mon, 16 Mar 2026 03:43:06 -0700 Subject: [PATCH] fix docstring for find_voicebox_pid_on_port --- tauri/src-tauri/src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tauri/src-tauri/src/main.rs b/tauri/src-tauri/src/main.rs index 559a36d3..21c44190 100644 --- a/tauri/src-tauri/src/main.rs +++ b/tauri/src-tauri/src/main.rs @@ -14,10 +14,11 @@ const SERVER_PORT: u16 = 17493; /// Find a voicebox-server process listening on a given port (Windows only). /// -/// Uses `TcpListener::bind` to confirm the port is occupied, then falls back -/// to `tasklist` to scan for a voicebox process. Returns the PID if found. -/// This replaces the previous `netstat -ano` approach which could fail on -/// systems with corrupted system DLLs (see #277). +/// Uses PowerShell `Get-NetTCPConnection` to look up the PID owning the port, +/// then verifies via `tasklist` that it's a voicebox process. The caller is +/// responsible for checking port occupancy first (e.g. `TcpStream::connect_timeout`). +/// Replaces the previous `netstat -ano` approach which failed on systems with +/// corrupted system DLLs (see #277). #[cfg(windows)] fn find_voicebox_pid_on_port(port: u16) -> Option { use std::process::Command;