From cc81bca617dad09727dd2c3feaa1a385de147b2b Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 21 May 2014 17:49:59 +1000 Subject: [PATCH] Be more selective about when to replenish connection requests --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index e697884e..bce8eab2 100644 --- a/client.go +++ b/client.go @@ -395,6 +395,7 @@ func (me *Client) connectionLoop(torrent *torrent, conn *connection) error { case peer_protocol.Unchoke: conn.PeerChoked = false me.peerUnchoked(torrent, conn) + me.replenishConnRequests(torrent, conn) case peer_protocol.Interested: conn.PeerInterested = true // TODO: This should be done from a dedicated unchoking routine. @@ -453,7 +454,6 @@ func (me *Client) connectionLoop(torrent *torrent, conn *connection) error { if err != nil { return err } - me.replenishConnRequests(torrent, conn) } } -- 2.48.1