mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-02 03:17:37 +03:00
udpnat2: Fix crash
This commit is contained in:
parent
d8153df67f
commit
9eafc7fc62
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ func New(handler N.UDPConnectionHandlerEx, prepare PrepareFunc, timeout time.Dur
|
|||
}
|
||||
var cache freelru.Cache[netip.AddrPort, *natConn]
|
||||
if !shared {
|
||||
cache = common.Must1(freelru.New[netip.AddrPort, *natConn](1024, maphash.NewHasher[netip.AddrPort]().Hash32))
|
||||
cache = common.Must1(freelru.NewSynced[netip.AddrPort, *natConn](1024, maphash.NewHasher[netip.AddrPort]().Hash32))
|
||||
} else {
|
||||
cache = common.Must1(freelru.NewSharded[netip.AddrPort, *natConn](1024, maphash.NewHasher[netip.AddrPort]().Hash32))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue