Commit 2ab33312 authored by harrylee's avatar harrylee

Merge branch 'master' of gitlab.33.cn:link33/sidecar

parents 2513b66d fd0f3d7c
Pipeline #8423 failed with stages
......@@ -134,6 +134,7 @@ func (p *PortMap) RandRouterPort() Port {
p.rw.RLock()
defer p.rw.RUnlock()
l := len(p.peerPort)
if l > 0 {
i := rand.Intn(l)
j := 0
for _, pt := range p.peerPort {
......@@ -142,6 +143,7 @@ func (p *PortMap) RandRouterPort() Port {
}
j++
}
}
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment