From ba592028e5863956a321c26651c57f3e3cbd772e Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 30 Nov 2021 15:19:59 +1100 Subject: [PATCH] Filter update requests on piece priority change by peer choking and allowed fast --- torrent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/torrent.go b/torrent.go index dfc56a32..7ccf13f6 100644 --- a/torrent.go +++ b/torrent.go @@ -1091,6 +1091,9 @@ func (t *Torrent) piecePriorityChanged(piece pieceIndex, reason string) { if !c.peerHasPiece(piece) { return } + if c.peerChoking && !c.peerAllowedFast.Contains(uint32(piece)) { + return + } c.updateRequests(reason) }) } -- 2.48.1