Skip to content

Commit 07f2863

Browse files
authored
fix: Fix a leaking ticker in the redis-proxy (#642)
Signed-off-by: jannfis <[email protected]>
1 parent 8ab3333 commit 07f2863

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

principal/redisproxy/redisproxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,9 @@ func (rp *RedisProxy) beginPingGoRoutineIfNeeded(connState *connectionState, age
530530
logCtx = logCtx.WithField("agent-name", agentName)
531531

532532
logCtx.Debug("Beginning ping thread")
533+
ticker := time.NewTicker(1 * time.Minute)
534+
defer ticker.Stop()
533535
for {
534-
ticker := time.NewTicker(1 * time.Minute)
535-
536536
select {
537537
case <-ticker.C:
538538
logCtx.Trace("sending ping on ping thread")

0 commit comments

Comments
 (0)