Skip to content

Commit 3c1d8c7

Browse files
committed
never abort the same controller twice
1 parent 3aa5811 commit 3c1d8c7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/coordinator/src/checkpointer.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,12 @@ export class Checkpointer {
248248
return false;
249249
}
250250

251-
controller.abort("cancelCheckpointing()");
251+
if (controller.signal.aborted) {
252+
this.#logger.debug("Controller already aborted", { runId });
253+
return false;
254+
}
255+
256+
controller.abort("cancelCheckpoint()");
252257
this.#abortControllers.delete(runId);
253258

254259
return true;

0 commit comments

Comments
 (0)