Skip to content

Commit f4c871e

Browse files
GiGurraclaude
andauthored
Fix missing ticker.Stop() in pollForSettingChanges (#1148)
The pollForSettingChanges function creates a ticker but never calls Stop() on it when the context is cancelled, leaking the ticker's internal runtime timer. Other functions in the same file (heartbeatLogLoop, reportQueueStatusLoop) correctly use defer ticker.Stop(). This aligns with that pattern. Note: pollForSettingChanges only runs when no notifier is configured (poll-only mode), so this only affects non-LISTEN/NOTIFY setups. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c449b62 commit f4c871e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

producer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ func (p *producer) pollForSettingChanges(ctx context.Context, wg *sync.WaitGroup
857857
defer wg.Done()
858858

859859
ticker := time.NewTicker(p.config.QueuePollInterval)
860+
defer ticker.Stop()
860861
for {
861862
select {
862863
case <-ctx.Done():

0 commit comments

Comments
 (0)