Skip to content

Commit c8a718b

Browse files
t3dotggclaude
andcommitted
fix(server): stop treats a server that exited before it read the process table as stopped
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent d0881c3 commit c8a718b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎apps/server/src/preview/PortScanner.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,8 @@ export const make = Effect.gen(function* PortDiscoveryMake() {
11361136
(cause) => new PreviewStopLocalServerError({ reason: "signal-failed", cause }),
11371137
),
11381138
);
1139+
// It exited after the scan, so there is nothing left to stop.
1140+
if (!table.has(input.pid)) return;
11391141
const group = stoppableProcessGroup(table, input.pid, process.pid);
11401142
if (group === null) return yield* new PreviewStopLocalServerError({ reason: "shared-group" });
11411143
// False when the whole group already exited.

0 commit comments

Comments
 (0)