mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 22:57:10 +00:00
fixes for mutex usage
This commit is contained in:
1 parent
59a5f832f6
commit
4271e619fe
4 files changed
+10
No files matched your search
@@ -20,8 +20,10 @@ func (this *SocksServer) ListenUDP(port v2net.Port) error {
|
||||
log.Error("Socks failed to listen UDP on port %d: %v", port, err)
|
||||
return err
|
||||
}
|
||||
this.udpMutex.Lock()
|
||||
this.udpAddress = v2net.UDPDestination(v2net.IPAddress(this.config.IP()), port)
|
||||
this.udpConn = conn
|
||||
this.udpMutex.Unlock()
|
||||
|
||||
go this.AcceptPackets()
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user