Fix deadlock on failed dial in UDP userland proxy

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexandr Morozov 2014-08-13 17:18:37 +04:00
parent 76c1b1371b
commit e4ec7eadc3

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