2
0
mirror of synced 2025-02-24 14:48:27 +00:00

Avoid copying mutex in piece

This commit is contained in:
Matt Joiner 2015-10-30 01:16:52 +11:00
parent 5372375bd5
commit f8fb480817

View File

@ -1781,7 +1781,8 @@ func (t *torrent) needData() bool {
if len(t.urgent) != 0 {
return true
}
for _, p := range t.Pieces {
for i := range t.Pieces {
p := &t.Pieces[i]
if p.Priority != PiecePriorityNone {
return true
}