Inline SSH tunnel cancellation error

Co-authored-by: codex <[email protected]>
This commit is contained in:
Julius Marmingeandcodex committed 2026-06-20 20:17:07 -07:00
1 parent 71558c1e04
commit 8f0c480d4a
1 file changed
+9 -10
+9 -10
View File
@@ -115,15 +115,6 @@ type SshEnvironmentEffectError =
| SshPasswordPromptError
| NetService.NetError;
function makeSshTunnelCancelledError(target: DesktopSshEnvironmentTarget): SshCommandError {
return new SshCommandCancelledError({
command: ["ssh"],
exitCode: null,
stderr: "",
target: target.alias || target.hostname,
});
}
function sshTargetLogFields(target: DesktopSshEnvironmentTarget) {
return {
alias: target.alias,
@@ -1271,7 +1262,15 @@ export const make = Effect.fn("ssh/tunnel.SshEnvironmentManager.make")(function*
return;
}
pendingTunnelEntries.delete(key);
yield* Deferred.fail(pending, makeSshTunnelCancelledError(target)).pipe(Effect.ignore);
yield* Deferred.fail(
pending,
new SshCommandCancelledError({
command: ["ssh"],
exitCode: null,
stderr: "",
target: target.alias || target.hostname,
}),
).pipe(Effect.ignore);
});
yield* Scope.addFinalizer(