mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
raft/autopilot: fix panic during autopilot shutdown (#27726)
* raft/autopilot: fix panic during autopilot shutdown * changelog
This commit is contained in:
parent
0dc041625e
commit
2a09bd47ba
2 changed files with 5 additions and 1 deletions
3
changelog/27726.txt
Normal file
3
changelog/27726.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
raft/autopilot: Fixed panic that may occur during shutdown
|
||||
```
|
||||
|
|
@ -636,7 +636,8 @@ func (b *RaftBackend) StopAutopilot() {
|
|||
if b.autopilot == nil {
|
||||
return
|
||||
}
|
||||
b.autopilot.Stop()
|
||||
stopCh := b.autopilot.Stop()
|
||||
<-stopCh
|
||||
b.autopilot = nil
|
||||
b.followerHeartbeatTicker.Stop()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue