We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8153df commit 9eafc7fCopy full SHA for 9eafc7f
common/udpnat2/service.go
@@ -27,7 +27,7 @@ func New(handler N.UDPConnectionHandlerEx, prepare PrepareFunc, timeout time.Dur
27
}
28
var cache freelru.Cache[netip.AddrPort, *natConn]
29
if !shared {
30
- 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))
31
} else {
32
cache = common.Must1(freelru.NewSharded[netip.AddrPort, *natConn](1024, maphash.NewHasher[netip.AddrPort]().Hash32))
33
0 commit comments