mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
hanging
This commit is contained in:
committed by
Yicheng Qin
parent
8f3544ece8
commit
728690fa03
@@ -30,6 +30,9 @@ type Peers map[int64][]string
|
||||
|
||||
func (ps Peers) Pick(id int64) string {
|
||||
addrs := ps[id]
|
||||
if len(addrs) == 0 {
|
||||
return ""
|
||||
}
|
||||
return fmt.Sprintf("http://%s", addrs[rand.Intn(len(addrs))])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user