Inline SSH tunnel cancellation error
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
71558c1e04
commit
8f0c480d4a
1 file changed
+9
-10
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user