From 2e035a268f7276a29e8f01019d75f191f7aca7fb Mon Sep 17 00:00:00 2001 From: Robert Cunius Jr Date: Wed, 4 May 2022 17:18:04 -0400 Subject: [PATCH] If the zfs command failed then the command hung. by calling maniwg.Done() in this case the program can exit. No improper side effects noticed, at least for the error, "Error waiting for zfs command to finish - exit status 1: WARNING: could not send X incremental source Y is not earlier than it" --- backup/backup.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backup/backup.go b/backup/backup.go index 29245d8..d420807 100644 --- a/backup/backup.go +++ b/backup/backup.go @@ -373,6 +373,8 @@ func Backup(pctx context.Context, jobInfo *files.JobInfo) error { case fileBuffer <- true: } case <-ctx.Done(): + log.AppLogger.Debugf("manifest copy: ctx.Done(): err = %v", ctx.Err()) + maniwg.Done() return ctx.Err() } }