connection.go | 4 ++++ diff --git a/connection.go b/connection.go index afd9d3a456e051417dc4ac3491e5005baffb2382..7e88f837d53ebfa4267a14f2f104323a9992ae90 100644 --- a/connection.go +++ b/connection.go @@ -520,6 +520,10 @@ func (cn *connection) stopRequestingPiece(piece int) { cn.pieceRequestOrder.Remove(piece) } +// This is distinct from Torrent piece priority, which is the user's +// preference. Connection piece priority is specific to a connection, +// pseudorandomly avoids connections always requesting the same pieces and +// thus wasting effort. func (cn *connection) updatePiecePriority(piece int) { tpp := cn.t.piecePriority(piece) if !cn.PeerHasPiece(piece) {