From 04db2a55d40421ad8d6f90a3f0fa6755a13771fc Mon Sep 17 00:00:00 2001 From: "stefan.rieckhof" Date: Fri, 17 Jan 2025 11:09:36 +0100 Subject: [PATCH] put ticker duration into ticker instantiation instead of having an own variable for it --- maintenance/failover/failover.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maintenance/failover/failover.go b/maintenance/failover/failover.go index 580db07d..82df646c 100644 --- a/maintenance/failover/failover.go +++ b/maintenance/failover/failover.go @@ -109,8 +109,7 @@ func (a *ActivePassive) Run(ctx context.Context) error { tryRefreshLock := time.NewTicker(a.timeToFailover) // Ticker to try to acquire the lock if in passive or undefined state - tryAcquireInterval := 500 * time.Millisecond - tryAcquireLock := time.NewTicker(tryAcquireInterval) + tryAcquireLock := time.NewTicker(500 * time.Millisecond) for { select {