Problem
In StopRunningTargetProcessesAsync (SteamLauncher.cs:471-500):
process.WaitForExit(1000) at :479 discards its return value, so the proxy swap proceeds
whether or not the process actually exited. A slow exit means overwriting a live executable.
await Task.Delay(500, cancellationToken) at :490 is gated on runningProcesses.Length > 0
— any process sharing the name, even when none matched the target path and nothing was killed.
- Both timeouts are bare literals.
Note that SteamLauncher.cs references SteamConstants only and has never used
ProcessConstants, so this is adopting the convention, not restoring it. LauncherDetectionDelayMs
and SteamProcessDiscoveryDelayMs are both 500 but describe unrelated waits — do not reuse them.
Approach
- Act on the
WaitForExit result: log and skip the swap, or escalate, when the process survives.
- Gate the settle delay on whether a kill actually happened.
- Add
ProcessKillWaitMs and ProcessKillSettleDelayMs to ProcessConstants.
Problem
In
StopRunningTargetProcessesAsync(SteamLauncher.cs:471-500):process.WaitForExit(1000)at:479discards its return value, so the proxy swap proceedswhether or not the process actually exited. A slow exit means overwriting a live executable.
await Task.Delay(500, cancellationToken)at:490is gated onrunningProcesses.Length > 0— any process sharing the name, even when none matched the target path and nothing was killed.
Note that
SteamLauncher.csreferencesSteamConstantsonly and has never usedProcessConstants, so this is adopting the convention, not restoring it.LauncherDetectionDelayMsand
SteamProcessDiscoveryDelayMsare both500but describe unrelated waits — do not reuse them.Approach
WaitForExitresult: log and skip the swap, or escalate, when the process survives.ProcessKillWaitMsandProcessKillSettleDelayMstoProcessConstants.