From: Matt Joiner Date: Mon, 8 Feb 2016 10:39:15 +0000 (+1100) Subject: When we're choked, just forget the requests, we don't need to delete them individuall... X-Git-Tag: v1.0.0~899 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=317783091df0bc1c3c52200ea725996a97c7b3b2;p=btrtrc.git When we're choked, just forget the requests, we don't need to delete them individually anymore --- diff --git a/client.go b/client.go index 805762f1..ad5ae2e0 100644 --- a/client.go +++ b/client.go @@ -1403,9 +1403,7 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error { switch msg.Type { case pp.Choke: c.PeerChoked = true - for r := range c.Requests { - me.connDeleteRequest(t, c, r) - } + c.Requests = nil // We can then reset our interest. c.updateRequests() case pp.Reject: