commit | 490c31a383e9d684df02553570fd54c7dc1f0391 | [log] [tgz] |
---|---|---|
author | Klesh Wong <zhenmian.huang@merico.dev> | Thu Apr 21 21:49:53 2022 +0800 |
committer | Klesh Wong <zhenmian.huang@merico.dev> | Thu Apr 21 21:49:53 2022 +0800 |
tree | 6468d9297a1da786638ef9004e9544c3b0fdd43f | |
parent | 9bd50417af818bd0d55cc1b29c4edb35cfcd95ac [diff] |
fix: task hangs indefinitely if more than one error occurs within `Input` logic
diff --git a/plugins/helper/api_collector.go b/plugins/helper/api_collector.go index 5fecac5..069a5ab 100644 --- a/plugins/helper/api_collector.go +++ b/plugins/helper/api_collector.go
@@ -179,7 +179,9 @@ break } } - wg.Wait() + if err == nil { + wg.Wait() + } } else { // or we just did it once err = collector.exec(nil)