Avoid copying mutex in piece
This commit is contained in:
parent
5372375bd5
commit
f8fb480817
@ -1781,7 +1781,8 @@ func (t *torrent) needData() bool {
|
|||||||
if len(t.urgent) != 0 {
|
if len(t.urgent) != 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
for _, p := range t.Pieces {
|
for i := range t.Pieces {
|
||||||
|
p := &t.Pieces[i]
|
||||||
if p.Priority != PiecePriorityNone {
|
if p.Priority != PiecePriorityNone {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user