From d63c5e5b981ecb6e3c14966b9288bbd3a34774b0 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 8 Jun 2015 18:16:01 +1000 Subject: [PATCH] Don't try to connect again without encryption, if encryption is disabled --- client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client.go b/client.go index b9b9e70e..2d6bbab5 100644 --- a/client.go +++ b/client.go @@ -819,6 +819,12 @@ func (me *Client) establishOutgoingConn(t *torrent, addr string) (c *connection, return } nc.Close() + // Try again without encryption, using whichever protocol type worked last + // time. + if me.config.DisableEncryption { + // We already tried without encryption. + return + } if utp { nc, err = me.dialUTP(addr, t) } else { -- 2.48.1