Fix deadlock on failed dial in UDP userland proxy

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 6cbb8e070d6c3a66bf48fbe5cbf689557eee23db
Component: engine
This commit is contained in:
Alexandr Morozov
2014-08-13 17:18:37 +04:00
parent e4f970ea7e
commit 08557c40b7

View File

@ -116,6 +116,7 @@ func (proxy *UDPProxy) Run() {
proxyConn, err = net.DialUDP("udp", nil, proxy.backendAddr)
if err != nil {
log.Printf("Can't proxy a datagram to udp/%s: %s\n", proxy.backendAddr, err)
proxy.connTrackLock.Unlock()
continue
}
proxy.connTrackTable[*fromKey] = proxyConn