Skip to content

Commit 92bdde5

Browse files
committed
Terminate the current codex connection if the codex process is exited
1 parent 28a24c7 commit 92bdde5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/CodexJsonRpcConnection.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ export function startCodexConnection(codexPath: string, logPath?: string): Messa
2323

2424
connection.listen();
2525

26+
// Terminate all current activities on process termination
27+
codex.on("exit", _ => {
28+
connection.dispose();
29+
});
30+
2631
return connection;
2732
}
2833

0 commit comments

Comments
 (0)