Skip to content

Commit

Permalink
Merge 8c5cf17 into backport/fix-raft-tls-key-rotation-panic/steadily-…
Browse files Browse the repository at this point in the history
…expert-louse
  • Loading branch information
hc-github-team-secure-vault-core committed Apr 26, 2022
2 parents 116e337 + 8c5cf17 commit 019e3f1
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 019e3f1

Please sign in to comment.