Merge pull request #2844 from sergiofspedro/fix/windows-port-release
fix: kill orphaned process on Windows before OpenCode restart
This commit is contained in:
@@ -1162,8 +1162,8 @@ const openCodeLifecycleRuntime = createOpenCodeLifecycleRuntime({
|
||||
return [...new Set(directories)];
|
||||
},
|
||||
// A managed restart can move OpenCode to a NEW port (the old one may stay
|
||||
// occupied by an orphaned process, e.g. killProcessOnPort is a no-op on
|
||||
// Windows). Rebind the message-stream upstream readers to the current port
|
||||
// occupied if killProcessOnPort/waitForPortRelease didn't free it in time,
|
||||
// on any platform). Rebind the message-stream upstream readers to the current port
|
||||
// so the UI keeps receiving events instead of staying pinned to the old
|
||||
// process (#2638). The runtime is created later by the startup pipeline;
|
||||
// by the time any restart runs, it is assigned.
|
||||
|
||||
Reference in New Issue
Block a user