Guard delayed terminal exit callback
- Skip `onSessionExited` if exit handling was reset before timeout runs - Prevent stale async exit callbacks from firing in terminal drawer
This commit is contained in:
1 parent
dd5b985d26
commit
e6fd90df22
1 file changed
+3
@@ -349,6 +349,9 @@ function TerminalViewport({
|
||||
}
|
||||
hasHandledExitRef.current = true;
|
||||
window.setTimeout(() => {
|
||||
if (!hasHandledExitRef.current) {
|
||||
return;
|
||||
}
|
||||
onSessionExitedRef.current();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user