add rate measure

This commit is contained in:
Asim Aslam
2019-10-22 19:38:29 +01:00
parent 407694232a
commit d64f8c665e
3 changed files with 93 additions and 7 deletions

View File

@@ -1085,17 +1085,16 @@ func (t *tun) Dial(channel string, opts ...DialOption) (Session, error) {
// set the link time
t.RLock()
link, ok := t.links[msg.link]
link, ok := t.links[c.link]
t.RUnlock()
if ok {
// set the rountrip time
link.setRTT(d)
// set measured to true
measured = true
}
// set measured to true
measured = true
// set discovered to true
c.discovered = true
}