]> Sergey Matveev's repositories - btrtrc.git/commitdiff
add return when utpsock's err is not nil
authorlovedboy <lovedboy.tk@qq.com>
Tue, 24 May 2016 05:24:29 +0000 (13:24 +0800)
committerlovedboy <lovedboy.tk@qq.com>
Tue, 24 May 2016 05:24:29 +0000 (13:24 +0800)
client.go

index e03e3a3c698fa721fcf10102e403ee27a6330b60..f77fafee487ea6d0e93032a4e6b195ad70e12c1d 100644 (file)
--- a/client.go
+++ b/client.go
@@ -235,6 +235,7 @@ func listen(tcp, utp bool, networkSuffix, addr string) (tcpL net.Listener, utpSo
                utpSock, err = listenUTP(networkSuffix, addr)
                if err != nil && tcp {
                        tcpL.Close()
+                       return
                }
                listenedAddr = utpSock.Addr().String()
        }