mirror of
https://github.com/restic/restic.git
synced 2026-10-30 03:55:42 +00:00
backup: prevent hang using --stdin-from-command if upload fails (#21829)
This commit is contained in:
1 parent
451cc6c048
commit
ce24640d75
3 files changed
+24
No files matched your search
@@ -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()
|
||||
}
|
||||
Reference in new issue
Block a user