1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-23 08:16:36 +00:00

Merge pull request #4065 from MichaelEischer/flaky-rclone-failed-start

rclone: treat "file already closed" as command startup error
This commit is contained in:
Michael Eischer 2022-12-03 17:42:56 +01:00 committed by GitHub
commit 60c6a09324
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -239,7 +239,7 @@ func newBackend(cfg Config, lim limiter.Limiter) (*Backend, error) {
// wait for rclone to exit // wait for rclone to exit
wg.Wait() wg.Wait()
// try to return the program exit code if communication with rclone has failed // try to return the program exit code if communication with rclone has failed
if be.waitResult != nil && (errors.Is(err, context.Canceled) || errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, syscall.EPIPE)) { if be.waitResult != nil && (errors.Is(err, context.Canceled) || errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, syscall.EPIPE) || errors.Is(err, os.ErrClosed)) {
err = be.waitResult err = be.waitResult
} }