Selaa lähdekoodia

etcd: standby should not be in a tight loop

Xiang Li 11 vuotta sitten
vanhempi
commit
468c345e74
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      etcd/standby.go

+ 1 - 1
etcd/standby.go

@@ -72,7 +72,7 @@ func newStandby(id int64, pubAddr string, raftPubAddr string, client *v2client,
 }
 }
 
 
 func (s *standby) run() int64 {
 func (s *standby) run() int64 {
-	var syncDuration time.Duration
+	syncDuration := time.Millisecond * 100
 	nodes := s.peerHub.getSeeds()
 	nodes := s.peerHub.getSeeds()
 	for {
 	for {
 		select {
 		select {