dev:udp: Add an Unlock before a continue, to fix a double lock bug

This commit is contained in:
lzhfromustc 2019-10-14 23:35:08 -04:00
parent cd44c9f55c
commit 8eb945ee9b

View File

@ -117,6 +117,7 @@ func Forwarder(dstAddr *net.UDPAddr, readCh <-chan *msg.UdpPacket, sendCh chan<-
if !ok { if !ok {
udpConn, err = net.DialUDP("udp", nil, dstAddr) udpConn, err = net.DialUDP("udp", nil, dstAddr)
if err != nil { if err != nil {
mu.Unlock()
continue continue
} }
udpConnMap[udpMsg.RemoteAddr.String()] = udpConn udpConnMap[udpMsg.RemoteAddr.String()] = udpConn