Преглед изворни кода

Merge pull request #8674 from gyuho/set-endpoints

clientv3: reset unhealthy on updateAddrs
Gyu-Ho Lee пре 8 година
родитељ
комит
bc03ce9cab
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      clientv3/health_balancer.go

+ 1 - 0
clientv3/health_balancer.go

@@ -120,6 +120,7 @@ func (hb *healthBalancer) updateAddrs(eps ...string) {
 	addrs, host2ep := eps2addrs(eps), getHost2ep(eps)
 	hb.mu.Lock()
 	hb.addrs, hb.eps, hb.host2ep = addrs, eps, host2ep
+	hb.unhealthy = make(map[string]time.Time)
 	hb.mu.Unlock()
 	hb.balancer.updateAddrs(eps...)
 }