connection.go | 3 +++ diff --git a/connection.go b/connection.go index 63a0da6b47c4afe771aed58f011f6a51ff20b6eb..0c3bc1c4898de120ddd9346109ecd3fd16c0a46a 100644 --- a/connection.go +++ b/connection.go @@ -739,6 +739,9 @@ return false } func (cn *connection) iterPendingPieces(f func(int) bool) bool { + if !cn.t.haveInfo() { + return false + } if cn.t.requestStrategy == 3 { return cn.iterUnbiasedPieceRequestOrder(f) }