Use pendingPieces in needData
This commit is contained in:
parent
0ad4dda9fc
commit
9091c0518d
|
@ -1679,6 +1679,9 @@ func (t *torrent) needData() bool {
|
||||||
if !t.haveInfo() {
|
if !t.haveInfo() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if len(t.pendingPieces) != 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return !t.forReaderWantedRegionPieces(func(begin, end int) (again bool) {
|
return !t.forReaderWantedRegionPieces(func(begin, end int) (again bool) {
|
||||||
for i := begin; i < end; i++ {
|
for i := begin; i < end; i++ {
|
||||||
if !t.pieceComplete(i) {
|
if !t.pieceComplete(i) {
|
||||||
|
|
Loading…
Reference in New Issue