1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

Only set link if not multicast

This commit is contained in:
Asim Aslam 2019-09-05 07:41:19 +01:00
parent d0761e0a1b
commit a1ba1482c5

View File

@ -855,10 +855,10 @@ func (t *tun) Dial(channel string, opts ...DialOption) (Session, error) {
}
t.RUnlock()
// discovered so set the link
// discovered so set the link if not multicast
// TODO: pick the link efficiently based
// on link status and saturation.
if c.discovered {
if c.discovered && !c.multicast {
// set the link
i := rand.Intn(len(links))
c.link = links[i]