Fix sqlite piece completion

This commit is contained in:
Matt Joiner 2021-05-14 15:19:49 +10:00
parent ad298364aa
commit fcc4ef2b95
1 changed files with 5 additions and 2 deletions

View File

@ -166,8 +166,11 @@ func (t *Torrent) decPieceAvailability(i pieceIndex) {
}
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 {