From: Matt Joiner Date: Thu, 7 Jul 2016 04:49:18 +0000 (+1000) Subject: Solve the mystery bug with TestMaxEstablishedConns X-Git-Tag: v1.0.0~656 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=838c35f3eacd562279c2e2abb6543708b2d3bd3f;p=btrtrc.git Solve the mystery bug with TestMaxEstablishedConns Adding Torrent by infohash wasn't triggering connections to be accepted, when both TCP and uTP were enabled. --- 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 }