fixes for mutex usage

This commit is contained in:
v2ray committed 2016-01-04 08:40:24 +01:00
1 parent 59a5f832f6
commit 4271e619fe
4 files changed
+10

No files matched your search

+2
View File
@@ -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