Triggered by connection.iterUnbiasedPieceRequestOrder calling Torrent.numPieces. We shouldn't be iterating pieces when there's no info anyway, so don't yield any. Mentioned in https://github.com/anacrolix/torrent/issues/253#issuecomment-
400350386.
}
func (cn *connection) iterPendingPieces(f func(int) bool) bool {
+ if !cn.t.haveInfo() {
+ return false
+ }
if cn.t.requestStrategy == 3 {
return cn.iterUnbiasedPieceRequestOrder(f)
}