Return errs only if it contains at least one error.
authorFlorian Forster <ff@octo.it>
Mon, 22 Jan 2018 19:41:06 +0000 (20:41 +0100)
committerFlorian Forster <ff@octo.it>
Mon, 22 Jan 2018 19:41:06 +0000 (20:41 +0100)
gfitsync.go

index 65cbfa6..5bb80fc 100644 (file)
@@ -296,5 +296,9 @@ func handleNotification(ctx context.Context, s *fitbit.Subscription) error {
        }()
 
        wg.Wait()
-       return errs
+
+       if len(errs) != 0 {
+               return errs
+       }
+       return nil
 }