peerconn.go | 7 ++++++- diff --git a/peerconn.go b/peerconn.go index c9a050a5cd7957b8c46624951ddf59bbf9912a11..c6019d29f078630c76a6e9c87a49e1b1a3333472 100644 --- a/peerconn.go +++ b/peerconn.go @@ -1497,7 +1497,12 @@ } if n < 0 { panic(n) } - c.updateRequests() + // If a request is rejected, updating the requests for the current peer first will miss the + // opportunity to try other peers for that request instead. I'm not sure about the interested + // check in the following loop however. + if false { + c.updateRequests() + } c.t.iterPeers(func(_c *peer) { if !_c.interested && _c != c && c.peerHasPiece(pieceIndex(r.Index)) { _c.updateRequests()