mirror of
https://github.com/SagerNet/sing-tun.git
synced 2025-12-24 13:18:21 +08:00
Revert "ping: Increate mapping capacity"
This reverts commit a24ab73aca.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user