projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5372375
)
Avoid copying mutex in piece
author
Matt Joiner <anacrolix@gmail.com>
Thu, 29 Oct 2015 14:16:52 +0000 (
01:16
+1100)
committer
Matt Joiner <anacrolix@gmail.com>
Thu, 29 Oct 2015 14:16:52 +0000 (
01:16
+1100)
client.go
patch
|
blob
|
history
diff --git
a/client.go
b/client.go
index 0385b4fa5b8d0d4b1ac0f751a075cb32fe97eab5..fea00be6a378bc24a0b8429a2d074c7ef8e1d1d6 100644
(file)
--- a/
client.go
+++ b/
client.go
@@
-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
}