diff options
author | Rasmus Dahlberg <rasmus@rgdd.se> | 2024-05-17 10:39:02 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@rgdd.se> | 2024-05-17 10:39:45 +0200 |
commit | e2024b9a379879ea2d741d76e3b0a65ece5154ea (patch) | |
tree | 1ad45ef3b00520ee36bc108975ca32e7beb569fd | |
parent | 67d41e6bbbffbb05900c41462761ecd3d277728c (diff) |
fix: Add loop in feedback's RunForever
This fixes the issue of the monitor stopping after the second pull.
-rw-r--r-- | internal/feedback/feedback.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/internal/feedback/feedback.go b/internal/feedback/feedback.go index 7501bbf..1446312 100644 --- a/internal/feedback/feedback.go +++ b/internal/feedback/feedback.go @@ -59,11 +59,13 @@ func (fb *Feedback) RunForever(ctx context.Context) { defer ticker.Stop() fb.pullOnce(ctx) - select { - case <-ticker.C: - fb.pullOnce(ctx) - case <-ctx.Done(): - return + for { + select { + case <-ticker.C: + fb.pullOnce(ctx) + case <-ctx.Done(): + return + } } } |