From 813bf5355abe25949063219ea26f80fcb1ffccb7 Mon Sep 17 00:00:00 2001 From: Gert Drapers <1533850+gertd@users.noreply.github.com> Date: Wed, 6 Nov 2024 17:19:35 -0800 Subject: [PATCH] exit on producer|subscriber err --- pkg/datasync/directory.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/datasync/directory.go b/pkg/datasync/directory.go index ea84449..6495121 100644 --- a/pkg/datasync/directory.go +++ b/pkg/datasync/directory.go @@ -54,7 +54,8 @@ func (s *Sync) syncDirectory(ctx context.Context, conn *grpc.ClientConn) error { }) if err := g.Wait(); err != nil { - s.logger.Debug().Err(err).Msg(syncRun) + s.logger.Error().Err(err).Msg(syncRun) + return err } if Has(s.options.Mode, Diff) {