Skip to content

Commit

Permalink
fix(device): signal waitgroup finish properly
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Sep 25, 2023
1 parent 6e203c2 commit ba309fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/device/helpers/polling.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func PollSensors(ctx context.Context, updater func(), interval, stdev time.Durat
for {
select {
case <-ctx.Done():
wg.Done()
return
case <-ticker.C:
updater()
Expand Down

0 comments on commit ba309fa

Please sign in to comment.