From 838c35f3eacd562279c2e2abb6543708b2d3bd3f Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 7 Jul 2016 14:49:18 +1000 Subject: [PATCH] Solve the mystery bug with TestMaxEstablishedConns Adding Torrent by infohash wasn't triggering connections to be accepted, when both TCP and uTP were enabled. --- client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client.go b/client.go index 2507e69c..e5cdf0c2 100644 --- a/client.go +++ b/client.go @@ -1475,6 +1475,8 @@ func (cl *Client) AddTorrentInfoHash(infoHash metainfo.Hash) (t *Torrent, new bo } cl.torrents[infoHash] = t t.updateWantPeersEvent() + // Tickle Client.waitAccept, new torrent may want conns. + cl.event.Broadcast() return } -- 2.50.0