]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Client would attempt to download if unchoked before the metadata is available
authorMatt Joiner <anacrolix@gmail.com>
Mon, 14 Jul 2014 13:12:15 +0000 (23:12 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 14 Jul 2014 13:12:15 +0000 (23:12 +1000)
client.go

index 831007af2bc389a80bae6c2c7a782941ed8d4f98..47bc5b6dc135b32d9eb4428da3b6e300ce63ff7c 100644 (file)
--- a/client.go
+++ b/client.go
@@ -1041,6 +1041,9 @@ func (cl *Client) assertRequestHeat() {
 }
 
 func (me *Client) replenishConnRequests(t *torrent, c *connection) {
+       if !t.haveInfo() {
+               return
+       }
        me.DownloadStrategy.FillRequests(t, c)
        //me.assertRequestHeat()
        if len(c.Requests) == 0 && !c.PeerChoked {