Only bootstrap when bootstrap_expect

This commit is contained in:
Mahmood Ali 2020-12-17 15:53:59 -05:00
parent 421380a300
commit 2ea8ae7584

View file

@ -83,7 +83,7 @@ func (s *Server) nodeJoin(me serf.MemberEvent) {
s.peerLock.Unlock()
// If we still expecting to bootstrap, may need to handle this
if atomic.LoadInt32(&s.config.Bootstrapped) == 0 {
if s.config.BootstrapExpect != 0 && atomic.LoadInt32(&s.config.Bootstrapped) == 0 {
s.maybeBootstrap()
}
}