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

This commit is contained in:
Michael Eischer
2026-05-31 15:27:05 +02:00
committed by GitHub
parent 451cc6c048
commit ce24640d75
3 changed files with 24 additions and 0 deletions
+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()
}