Skip to content

Commit c1796b9

Browse files
Update src/api/providers/codex.ts
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
1 parent e218bdd commit c1796b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/providers/codex.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ export class CodexHandler extends OpenAiNativeHandler {
4949

5050
process.once("exit", () => {
5151
void this.disposeAllSessions()
52-
})
52+
process.once("exit", () => {
53+
this.disposeAllSessions().catch(error =>
54+
console.error("Failed to dispose Codex sessions on exit:", error)
55+
)
56+
})
5357
}
5458

5559
private static hydrateOpenAiAuth(options: ApiHandlerOptions): ApiHandlerOptions {

0 commit comments

Comments
 (0)