syncs: delete Map.Range, update callers to iterators
Updates #11038 Change-Id: I2819fed896cc4035aba5e4e141b52c12637373b1 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
2cadb80fb2
commit
c763b7a7db
@ -414,15 +414,14 @@ func init() {
|
||||
// endpoint, and name collisions will result in Prometheus scraping errors.
|
||||
clientmetric.NewCounterFunc("netstack_tcp_forward_dropped_attempts", func() int64 {
|
||||
var total uint64
|
||||
stacksForMetrics.Range(func(ns *Impl, _ struct{}) bool {
|
||||
for ns := range stacksForMetrics.Keys() {
|
||||
delta := ns.ipstack.Stats().TCP.ForwardMaxInFlightDrop.Value()
|
||||
if total+delta > math.MaxInt64 {
|
||||
total = math.MaxInt64
|
||||
return false
|
||||
break
|
||||
}
|
||||
total += delta
|
||||
return true
|
||||
})
|
||||
}
|
||||
return int64(total)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user