Changes to the way piece prioritization affects the piece
This commit is contained in:
parent
21fb4933fc
commit
5b52769523
11
client.go
11
client.go
|
@ -344,9 +344,14 @@ func (cl *Client) prioritizePiece(t *torrent, piece int, priority piecePriority)
|
|||
if t.havePiece(piece) {
|
||||
return
|
||||
}
|
||||
cl.queueFirstHash(t, piece)
|
||||
t.Pieces[piece].Priority = priority
|
||||
cl.pieceChanged(t, piece)
|
||||
if priority != PiecePriorityNone {
|
||||
cl.queueFirstHash(t, piece)
|
||||
}
|
||||
p := t.Pieces[piece]
|
||||
if p.Priority != priority {
|
||||
p.Priority = priority
|
||||
cl.pieceChanged(t, piece)
|
||||
}
|
||||
}
|
||||
|
||||
func (cl *Client) setEnvBlocklist() (err error) {
|
||||
|
|
Loading…
Reference in New Issue