This adds two new configuration options:
// The number of connections at which we stop trying to connect to more
// devices, zero meaning no limit. Does not affect incoming connections.
ConnectionLimitEnough int
// The maximum number of connections which we will allow in total, zero
// meaning no limit. Affects incoming connections and prevents
// attempting outgoing connections.
ConnectionLimitMax int
These can be used to limit the number of concurrent connections in
various ways.
This commit is contained in:
@@ -3407,7 +3407,7 @@ func TestDeviceWasSeen(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error("Unexpected error:", err)
|
||||
}
|
||||
entry := stats[device1.String()]
|
||||
entry := stats[device1]
|
||||
if time.Since(entry.LastSeen) > time.Second {
|
||||
t.Error("device should have been seen now")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user