mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix a bug when compare cluster len
This commit is contained in:
parent
ac945c77de
commit
f470702b88
2
etcd.go
2
etcd.go
@ -223,7 +223,7 @@ func startRaft(securityType int) {
|
|||||||
if raftServer.IsLogEmpty() {
|
if raftServer.IsLogEmpty() {
|
||||||
|
|
||||||
// start as a leader in a new cluster
|
// start as a leader in a new cluster
|
||||||
if len(cluster) == 1 && cluster[0] == "" {
|
if len(cluster) == 0 {
|
||||||
raftServer.StartLeader()
|
raftServer.StartLeader()
|
||||||
|
|
||||||
time.Sleep(time.Millisecond * 20)
|
time.Sleep(time.Millisecond * 20)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user