mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-29 18:42:19 +00:00
fix(core): release exited shell execution state (#46058)
This commit is contained in:
parent
e3bda5e2d0
commit
51a082cea3
1 changed files with 5 additions and 3 deletions
|
|
@ -369,9 +369,11 @@ const layer = () =>
|
|||
if (!oldest) break
|
||||
yield* removeCommand(oldest)
|
||||
}
|
||||
// Cancel a pending timeout once the command exits on its own. Interrupting last avoids
|
||||
// aborting finish when finish itself runs on the timeout fiber.
|
||||
if (command.timeoutFiber) yield* Fiber.interrupt(command.timeoutFiber)
|
||||
// Keep exited history data-only. Interrupt last because finish may run on the timeout fiber.
|
||||
const timeoutFiber = command.timeoutFiber
|
||||
command.timeout = undefined
|
||||
command.timeoutFiber = undefined
|
||||
if (timeoutFiber) yield* Fiber.interrupt(timeoutFiber)
|
||||
})
|
||||
|
||||
command.timeout = (duration) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue