mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 22:57:10 +00:00
Lazy initialization of UDP ports map
This commit is contained in:
1 parent
2a4edde634
commit
365baa0c6a
2 files changed
+7
-1
No files matched your search
+3
-1
@@ -68,12 +68,14 @@ func (m *portMap) popPort(token uint16) *net.UDPAddr {
|
||||
}
|
||||
|
||||
var (
|
||||
ports = newPortMap()
|
||||
ports *portMap
|
||||
|
||||
udpConn *net.UDPConn
|
||||
)
|
||||
|
||||
func (server *SocksServer) ListenUDP(port uint16) error {
|
||||
ports = newPortMap()
|
||||
|
||||
addr := &net.UDPAddr{
|
||||
IP: net.IP{0, 0, 0, 0},
|
||||
Port: int(port),
|
||||
|
||||
Reference in new issue
Block a user