Skip to content

Commit a24ab73

Browse files
committed
ping: Increate mapping capacity
1 parent b5f3fec commit a24ab73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

route_direct.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package tun
22

33
import (
4+
"math"
45
"net/netip"
56
"time"
67

@@ -29,7 +30,7 @@ type DirectRouteMapping struct {
2930
}
3031

3132
func NewDirectRouteMapping(timeout time.Duration) *DirectRouteMapping {
32-
mapping := common.Must1(freelru.NewSharded[DirectRouteSession, DirectRouteDestination](1024, maphash.NewHasher[DirectRouteSession]().Hash32))
33+
mapping := common.Must1(freelru.NewSharded[DirectRouteSession, DirectRouteDestination](math.MaxUint16, maphash.NewHasher[DirectRouteSession]().Hash32))
3334
mapping.SetHealthCheck(func(session DirectRouteSession, action DirectRouteDestination) bool {
3435
if action != nil {
3536
return !action.IsClosed()

0 commit comments

Comments
 (0)