torrent.go | 7 +++++-- diff --git a/torrent.go b/torrent.go index 05598b3c151029e7075c0d0b5623f54f4521214a..70e4ecd8d81addf1e86d68d8d4185b70ecda91ef 100644 --- a/torrent.go +++ b/torrent.go @@ -166,8 +166,11 @@ p.availability-- } func (t *Torrent) incPieceAvailability(i pieceIndex) { - p := t.piece(i) - p.availability++ + // If we don't the info, this should be reconciled when we do. + if t.haveInfo() { + p := t.piece(i) + p.availability++ + } } func (t *Torrent) numConns() int {