Comment on connection.updatePiecePriority
There's also Torrent.updatePiecePriority, and it's always confusing what the difference is.
This commit is contained in:
parent
5e83287890
commit
a49e133d8a
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue