add comment to tunnel link selection

This commit is contained in:
Asim Aslam 2019-09-04 20:19:53 +01:00
parent e15389febb
commit cc5d811a83

View File

@ -856,6 +856,8 @@ func (t *tun) Dial(channel string, opts ...DialOption) (Session, error) {
t.RUnlock() t.RUnlock()
// discovered so set the link // discovered so set the link
// TODO: pick the link efficiently based
// on link status and saturation.
if c.discovered { if c.discovered {
// set the link // set the link
i := rand.Intn(len(links)) i := rand.Intn(len(links))