You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0914db0
Browse filesBrowse the repository at this point in the historyBrowse files
fix(windows): keep the service port private and make the CLI recover from stale services
Running `simdeck` on Windows could sit silent for three minutes and then
come up on a different port. Four Windows-specific gaps combined to cause it:
- Tokio creates Windows sockets with `socket()`, so the HTTP listener handle
was inheritable and every adb server or emulator the service spawned kept
the port open after the service exited. The listener now clears its
inherit flag right after binding.
- The CLI probed an existing service's `/api/health` with the 180 second
HTTP client read timeout, so an orphaned port that accepts but never
answers stalled every command. The probe now uses a 5 second bounded
connect/read timeout.
- Process control shelled out to `kill` and `ps`, which do not exist on
Windows, so `service stop` and `simdeck kill` reported success without
ending anything and stale services accumulated. Windows now checks
processes through OpenProcess/GetExitCodeProcess and terminates the
service tree with `taskkill /T`.
- The state directory came from `HOME`, which PowerShell and cmd do not
set, so each shell used a different service.json. Home resolution is now
shared in `platform::user_home_dir` and honours USERPROFILE.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5M5zpn6gaZYNyjANLwfoP
0 commit comments