This commit is contained in:
ston1th 2020-11-15 00:43:34 +01:00
commit 41027fa380
5 changed files with 9 additions and 11 deletions

View file

@ -217,7 +217,10 @@ func logPanic(r interface{}) {
}
func (c *Cluster) Stepdown() {
c.stepdown <- struct{}{}
select {
case c.stepdown <- struct{}{}:
case <-time.After(time.Second * 2):
}
}
func (c *Cluster) Stop() {