mirror of https://github.com/coder/coder.git
fix(agent/agentssh): allow scp to exit with zero status (#12028)
Fixes #11786
This commit is contained in:
parent
d3ccb07361
commit
f2aef0726b
|
@ -557,7 +557,7 @@ func (s *Server) sftpHandler(logger slog.Logger, session ssh.Session) {
|
|||
defer server.Close()
|
||||
|
||||
err = server.Serve()
|
||||
if errors.Is(err, io.EOF) {
|
||||
if err == nil || errors.Is(err, io.EOF) {
|
||||
// Unless we call `session.Exit(0)` here, the client won't
|
||||
// receive `exit-status` because `(*sftp.Server).Close()`
|
||||
// calls `Close()` on the underlying connection (session),
|
||||
|
|
Loading…
Reference in New Issue