From e4ec7eadc3477ef3a268070205d44ae8747367df Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Wed, 13 Aug 2014 17:18:37 +0400 Subject: [PATCH] Fix deadlock on failed dial in UDP userland proxy Signed-off-by: Alexandr Morozov --- proxy/udp_proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy/udp_proxy.go b/proxy/udp_proxy.go index 14f2306..ae6a7bb 100644 --- a/proxy/udp_proxy.go +++ b/proxy/udp_proxy.go @@ -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