This adds a statistic to track the last connection duration per device. It isn't used for much in this PR, but it's available for #7223 to use in deciding how to order device connection attempts (deprioritizing devices that just dropped our connection the last time).
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"errors"
|
||||
"net"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var ErrClosed = errors.New("closed")
|
||||
@@ -90,6 +91,10 @@ func (f *FakeConnectionInfo) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (f *FakeConnectionInfo) EstablishedAt() time.Time {
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
type FakeAddr struct{}
|
||||
|
||||
func (FakeAddr) Network() string {
|
||||
|
||||
Reference in New Issue
Block a user