Skip to content

Commit eb560e2

Browse files
authored
Fix process cleanup timeout causing port binding errors in no-hot-reload mode (#51632)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 51657c7 commit eb560e2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/BuiltInTools/Watch/Context/EnvironmentOptions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ internal sealed record EnvironmentOptions(
6161
);
6262

6363
public TimeSpan GetProcessCleanupTimeout(bool isHotReloadEnabled)
64-
// If Hot Reload mode is disabled the process is restarted on every file change.
65-
// Waiting for graceful termination would slow down the turn around.
66-
=> ProcessCleanupTimeout ?? (isHotReloadEnabled ? TimeSpan.FromSeconds(5) : TimeSpan.FromSeconds(0));
64+
// Allow sufficient time for the process to exit gracefully and release resources (e.g., network ports).
65+
=> ProcessCleanupTimeout ?? TimeSpan.FromSeconds(5);
6766

6867
private int _uniqueLogId;
6968

0 commit comments

Comments
 (0)