From 055fe13ec0d608b657c4e35dde91cff22832b2f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 26 Aug 2025 23:54:57 +0800 Subject: [PATCH] Revert "ping: Increate mapping capacity" This reverts commit a24ab73aca0c3a19c1ebd12152abdd47db607f5a. --- route_direct.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/route_direct.go b/route_direct.go index b001f19..444eb5e 100644 --- a/route_direct.go +++ b/route_direct.go @@ -1,7 +1,6 @@ package tun import ( - "math" "net/netip" "time" @@ -30,7 +29,7 @@ type DirectRouteMapping struct { } func NewDirectRouteMapping(timeout time.Duration) *DirectRouteMapping { - mapping := common.Must1(freelru.NewSharded[DirectRouteSession, DirectRouteDestination](math.MaxUint16, maphash.NewHasher[DirectRouteSession]().Hash32)) + mapping := common.Must1(freelru.NewSharded[DirectRouteSession, DirectRouteDestination](1024, maphash.NewHasher[DirectRouteSession]().Hash32)) mapping.SetHealthCheck(func(session DirectRouteSession, action DirectRouteDestination) bool { if action != nil { return !action.IsClosed()