From: lovedboy Date: Tue, 24 May 2016 05:24:29 +0000 (+0800) Subject: add return when utpsock's err is not nil X-Git-Tag: v1.0.0~695^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ca8d9de94433e923e36cd7a1c8dde7dc2fcb080d;p=btrtrc.git add return when utpsock's err is not nil --- diff --git a/client.go b/client.go index e03e3a3c..f77fafee 100644 --- 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() }