From 9091c0518d22765b81dae398d6feb096144ba138 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 24 Jan 2016 15:21:31 +1100 Subject: [PATCH] Use pendingPieces in needData --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index d1dcd4a8..007186e9 100644 --- a/client.go +++ b/client.go @@ -1679,6 +1679,9 @@ func (t *torrent) needData() bool { if !t.haveInfo() { return true } + if len(t.pendingPieces) != 0 { + return true + } return !t.forReaderWantedRegionPieces(func(begin, end int) (again bool) { for i := begin; i < end; i++ { if !t.pieceComplete(i) {