Browse Source

Merge pull request #1465 from lzhfromustc/dev_dup_mis_unlock

dev:udp: Add an Unlock before a continue, to fix a double lock bug
pull/1494/head
fatedier 5 years ago committed by GitHub
parent
commit
0927553fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      models/proto/udp/udp.go

1
models/proto/udp/udp.go

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

Loading…
Cancel
Save