backup: prevent hang using --stdin-from-command if upload fails (#21829)

This commit is contained in:
Michael Eischer authored and GitHub committed 2026-05-31 15:27:05 +02:00
1 parent 451cc6c048
commit ce24640d75
3 files changed
+24

No files matched your search

+3
View File
@@ -97,5 +97,8 @@ func (fp *CommandReader) Close() error {
return nil
}
// This line can only be reached if the command was not read until the end. This can, for example,
// happen if a backup run is interrupted. Kill the command to avoid hanging.
_ = fp.cmd.Cancel()
return fp.wait()
}