Revert "ping: Increate mapping capacity"
This reverts commit a24ab73aca.
This commit is contained in:
parent
e8d7fc1bb2
commit
055fe13ec0
1 changed files with 1 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue