fix(cursor): await callback cleanup on stop
This commit is contained in:
1 parent
a1d871198a
commit
f9f3ed7e35
1 file changed
+4
-2
@@ -480,8 +480,10 @@ export function makeCursorAdapter(
|
||||
Effect.gen(function* () {
|
||||
if (ctx.stopped) return;
|
||||
ctx.stopped = true;
|
||||
yield* settlePendingApprovalsAsCancelled(ctx.pendingApprovals);
|
||||
yield* settlePendingUserInputsAsEmptyAnswers(ctx.pendingUserInputs);
|
||||
yield* settlePendingCallbacksBeforeTurnCompletion(
|
||||
ctx.pendingApprovals,
|
||||
ctx.pendingUserInputs,
|
||||
);
|
||||
if (ctx.notificationFiber) {
|
||||
yield* Fiber.interrupt(ctx.notificationFiber);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user