Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b0b80a

Browse files
committed
Revert SSH conn handling
1 parent9936923 commit9b0b80a

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

‎agent/agent.go

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -645,24 +645,15 @@ func (a *agent) init(ctx context.Context) {
645645
sshLogger.Info(ctx,"ssh connection ended",slog.Error(err))
646646
},
647647
Handler:func(session ssh.Session) {
648-
err:=a.trackConnGoroutine(func() {
649-
err:=a.handleSSHSession(session)
650-
varexitError*exec.ExitError
651-
ifxerrors.As(err,&exitError) {
652-
a.logger.Debug(ctx,"ssh session returned",slog.Error(exitError))
653-
_=session.Exit(exitError.ExitCode())
654-
return
655-
}
656-
iferr!=nil {
657-
a.logger.Warn(ctx,"ssh session failed",slog.Error(err))
658-
// This exit code is designed to be unlikely to be confused for a legit exit code
659-
// from the process.
660-
_=session.Exit(MagicSessionErrorCode)
661-
return
662-
}
663-
})
648+
err:=a.handleSSHSession(session)
649+
varexitError*exec.ExitError
650+
ifxerrors.As(err,&exitError) {
651+
a.logger.Debug(ctx,"ssh session returned",slog.Error(exitError))
652+
_=session.Exit(exitError.ExitCode())
653+
return
654+
}
664655
iferr!=nil {
665-
a.logger.Warn(ctx,"trackssh session failed",slog.Error(err))
656+
a.logger.Warn(ctx,"ssh session failed",slog.Error(err))
666657
// This exit code is designed to be unlikely to be confused for a legit exit code
667658
// from the process.
668659
_=session.Exit(MagicSessionErrorCode)

‎cli/root_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ExtractCommandPathsLoop:
121121

122122
got:=buf.Bytes()
123123
// Remove CRLF newlines (Windows).
124-
//got = bytes.ReplaceAll(got, []byte{'\r', '\n'}, []byte{'\n'})
124+
got=bytes.ReplaceAll(got, []byte{'\r','\n'}, []byte{'\n'})
125125

126126
// The `coder templates create --help` command prints the path
127127
// to the working directory (--directory flag default value).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp