Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ed5efe5

Browse files
committed
Inline errConnectionDropped
1 parent 8fd5116 commit ed5efe5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cli/ssh.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import (
3636
var workspacePollInterval = time.Minute
3737
var autostopNotifyCountdown = []time.Duration{30 * time.Minute}
3838

39-
var errConnectionDropped = xerrors.New("SSH connection ended unexpectedly")
40-
4139
func ssh() *cobra.Command {
4240
var (
4341
stdio bool
@@ -237,7 +235,7 @@ func ssh() *cobra.Command {
237235
// If the connection drops unexpectedly, we get an ExitMissingError but no other
238236
// error details, so try to at least give the user a better message
239237
if errors.Is(err, &gossh.ExitMissingError{}) {
240-
return errConnectionDropped
238+
return xerrors.New("SSH connection ended unexpectedly")
241239
}
242240
return err
243241
}

0 commit comments

Comments
 (0)