mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-29 21:33:54 +00:00
fix(question): clean up pending entry on abort (#17533)
This commit is contained in:
parent
8f957b8f90
commit
52877d8765
@ -129,7 +129,12 @@ export class QuestionService extends ServiceMap.Service<QuestionService, Questio
|
||||
pending.set(id, { info, deferred })
|
||||
Bus.publish(Event.Asked, info)
|
||||
|
||||
return yield* Deferred.await(deferred)
|
||||
return yield* Effect.ensuring(
|
||||
Deferred.await(deferred),
|
||||
Effect.sync(() => {
|
||||
pending.delete(id)
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
const reply = Effect.fn("QuestionService.reply")(function* (input: { requestID: QuestionID; answers: Answer[] }) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user