We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1f318b commit 1b3adb7Copy full SHA for 1b3adb7
pkg/settings/limits/updater.go
@@ -82,7 +82,7 @@ func (u *updater[N]) updateLoop(cre contexts.CRE) {
82
var c <-chan time.Time
83
if u.subFn != nil {
84
updates, cancelSub = u.subFn(contexts.WithCRE(ctx, cre))
85
- defer cancelSub()
+ defer func() { cancelSub() }() // extra func wrapper is required to ensure we get the final cancelSub value
86
// opt: poll now to initialize
87
} else {
88
t := services.TickerConfig{}.NewTicker(pollPeriod)
0 commit comments