From 317783091df0bc1c3c52200ea725996a97c7b3b2 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 8 Feb 2016 21:39:15 +1100 Subject: [PATCH] When we're choked, just forget the requests, we don't need to delete them individually anymore --- client.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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: -- 2.48.1