mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: do not block on raft stopping
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
2af1605db3
commit
327f09fcb4
@ -260,7 +260,11 @@ func (r *raftNode) start(rh *raftReadyHandler) {
|
|||||||
// blocks until 'applyAll' calls 'applyWait.Trigger'
|
// blocks until 'applyAll' calls 'applyWait.Trigger'
|
||||||
// to be in sync with scheduled config-change job
|
// to be in sync with scheduled config-change job
|
||||||
// (assume raftDone has cap of 1)
|
// (assume raftDone has cap of 1)
|
||||||
raftDone <- struct{}{}
|
select {
|
||||||
|
case raftDone <- struct{}{}:
|
||||||
|
case <-r.stopped:
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// gofail: var raftBeforeFollowerSend struct{}
|
// gofail: var raftBeforeFollowerSend struct{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user