Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan Goyal <137564277+ary82@users.noreply.github.com>
  • Loading branch information
ary82 committed Jan 17, 2025
1 parent 6e6a3be commit c48dc0a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func NewFileSource(options Options, logger *zap.Logger) (source.Source, error) {
}

if options.ReloadInterval > 0 {
h.wg.Add(1)
go h.autoUpdateStrategies(ctx, options.ReloadInterval, loadFn)
}
return h, nil
Expand Down Expand Up @@ -160,9 +161,7 @@ func (h *samplingProvider) samplingStrategyLoader(strategiesFile string) strateg
}

func (h *samplingProvider) autoUpdateStrategies(ctx context.Context, interval time.Duration, loader strategyLoader) {
h.wg.Add(1)
defer h.wg.Done()

lastValue := string(nullJSON)
ticker := time.NewTicker(interval)
defer ticker.Stop()
Expand Down

0 comments on commit c48dc0a

Please sign in to comment.