Skip to content

Commit f2aef07

Browse files
authored
fix(agent/agentssh): allow scp to exit with zero status (#12028)
Fixes #11786
1 parent d3ccb07 commit f2aef07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agent/agentssh/agentssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ func (s *Server) sftpHandler(logger slog.Logger, session ssh.Session) {
557557
defer server.Close()
558558

559559
err = server.Serve()
560-
if errors.Is(err, io.EOF) {
560+
if err == nil || errors.Is(err, io.EOF) {
561561
// Unless we call `session.Exit(0)` here, the client won't
562562
// receive `exit-status` because `(*sftp.Server).Close()`
563563
// calls `Close()` on the underlying connection (session),

0 commit comments

Comments
 (0)