lib/connections, lib/model: Track last connection duration (ref #7223) (#7242)

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:
Jakob Borg
2021-01-05 17:45:07 +01:00
committed by GitHub
parent c48eb4241a
commit b13b15758d
13 changed files with 121 additions and 28 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ func (d *relayDialer) Dial(ctx context.Context, id protocol.DeviceID, uri *url.U
return internalConn{}, err
}
return internalConn{tc, connTypeRelayClient, relayPriority}, nil
return newInternalConn(tc, connTypeRelayClient, relayPriority), nil
}
type relayDialerFactory struct{}