Revert "ping: Increate mapping capacity"

This reverts commit a24ab73aca.
This commit is contained in:
世界
2025-08-26 23:54:57 +08:00
parent e8d7fc1bb2
commit 055fe13ec0

View File

@@ -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()