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) {
|
if t.havePiece(piece) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
cl.queueFirstHash(t, piece)
|
if priority != PiecePriorityNone {
|
||||||
t.Pieces[piece].Priority = priority
|
cl.queueFirstHash(t, piece)
|
||||||
cl.pieceChanged(t, piece)
|
}
|
||||||
|
p := t.Pieces[piece]
|
||||||
|
if p.Priority != priority {
|
||||||
|
p.Priority = priority
|
||||||
|
cl.pieceChanged(t, piece)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cl *Client) setEnvBlocklist() (err error) {
|
func (cl *Client) setEnvBlocklist() (err error) {
|
||||||
|
|
Loading…
Reference in New Issue