fix: replace netstat with TcpStream + PowerShell for port detection (#277)

On Windows, Voicebox shelled out to netstat.exe on startup to check for
existing server processes. On systems with corrupted DLLs, netstat fails
with 0xc0000142, causing an infinite loading loop.

Replace with:
- TcpStream::connect_timeout() for port-in-use checks (pure Rust)
- PowerShell Get-NetTCPConnection for port-to-PID lookup (built-in cmdlet)
- tasklist for process name verification (unchanged)

Closes #277
This commit is contained in:
James Pine
2026-03-16 02:15:26 -07:00
parent b3012ed10c
commit 7c1ea0a1e1
2 changed files with 62 additions and 60 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ Windows SmartScreen may warn that the app is unrecognized.
lsof -i :17493
# Windows
netstat -ano | findstr :17493
powershell -Command "Get-NetTCPConnection -LocalPort 17493 -State Listen"
```
Kill the process using the port: