Skip to content

Commit

Permalink
backport of commit 8c5cf17
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso committed Apr 25, 2022
1 parent 78cb15f commit 29a0af7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vault/raft.go
Expand Up @@ -500,7 +500,6 @@ func (c *Core) raftTLSRotatePhased(ctx context.Context, logger hclog.Logger, raf
ticker := time.NewTicker(time.Until(nextRotationTime))
defer ticker.Stop()
for {
ticker.Reset(time.Until(nextRotationTime))
select {
case <-keyCheckInterval.C:
err := checkCommitted()
Expand All @@ -517,6 +516,8 @@ func (c *Core) raftTLSRotatePhased(ctx context.Context, logger hclog.Logger, raf
nextRotationTime = getNextRotationTime(next)
}

ticker.Reset(time.Until(nextRotationTime))

case <-stopCh:
return
}
Expand Down

0 comments on commit 29a0af7

Please sign in to comment.