From: Matt Joiner Date: Sun, 16 Nov 2014 19:51:59 +0000 (-0600) Subject: Fix broken commit X-Git-Tag: v1.0.0~1540 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=3489a60154326d3ec272839a92a486e85dcbbd65;p=btrtrc.git Fix broken commit --- diff --git a/client.go b/client.go index 1ba632ae..8c9e64df 100644 --- a/client.go +++ b/client.go @@ -383,10 +383,14 @@ func (me *Client) initiateConn(peer Peer, t *torrent) { // "address in use" error. It seems it's not possible to dial out from // this address so that peers associate our local address with our // listen address. + var ( + conn net.Conn + err error + ) if false { - conn, err := net.DialTimeout("tcp", addr, dialTimeout) + conn, err = net.DialTimeout("tcp", addr, dialTimeout) } else { - conn, err := (&utp.Dialer{Timeout: dialTimeout}).Dial("utp", addr) + conn, err = (&utp.Dialer{Timeout: dialTimeout}).Dial("utp", addr) } // Whether or not the connection attempt succeeds, the half open