fix(ssh): report abort after process exit
Preserve cancellation semantics when a user interrupt unblocks SSH stream drains after the mux client already exited. Fixes #2180
This commit is contained in:
@@ -147,7 +147,10 @@ export async function executeSSH(
|
||||
throw event.error;
|
||||
}
|
||||
|
||||
await streamsSettled;
|
||||
const streamEvent = await (abortEvent ? Promise.race([streamsSettled, abortEvent]) : streamsSettled);
|
||||
if (streamEvent?.kind === "error") {
|
||||
throw streamEvent.error;
|
||||
}
|
||||
return {
|
||||
exitCode: event.exitCode,
|
||||
cancelled: false,
|
||||
|
||||
Reference in New Issue
Block a user