| author | |
| committer | |
| log | 21c823ecdc63ebfae0226f174f639191a971cd85 |
| tree | 623e0cd51ac562eb4251e9225b1721629454e107 |
| parent | 80498f1709e05caa744716b740fdcaa884bef8e0 |
- Skip `onSessionExited` if exit handling was reset before timeout runs
- Prevent stale async exit callbacks from firing in terminal drawer1 files changed, 3 insertions(+), 0 deletions(-)
apps/web/src/components/ThreadTerminalDrawer.tsx+3| ... | ... | @@ -349,6 +349,9 @@ function TerminalViewport({ |
| 349 | 349 | } |
| 350 | 350 | hasHandledExitRef.current = true; |
| 351 | 351 | window.setTimeout(() => { |
| 352 | if (!hasHandledExitRef.current) { | |
| 353 | return; | |
| 354 | } | |
| 352 | 355 | onSessionExitedRef.current(); |
| 353 | 356 | }, 0); |
| 354 | 357 | } |