Skip to content

Commit 2d84b7c

Browse files
committed
prevent uncancellable checkpoints
1 parent a9928be commit 2d84b7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/coordinator/src/checkpointer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ export class Checkpointer {
436436
this.#logger.error("Error during cleanup", { ...metadata, error });
437437
}
438438

439-
this.#abortControllers.delete(runId);
439+
// Ensure only the current controller is removed
440+
if (this.#abortControllers.get(runId) === controller) {
441+
this.#abortControllers.delete(runId);
442+
}
440443
controller.signal.removeEventListener("abort", onAbort);
441444
};
442445

0 commit comments

Comments
 (0)