2
0
mirror of synced 2025-02-24 14:48:27 +00:00

TorrentReadAt shouldn't care about verification state

This commit is contained in:
Matt Joiner 2014-05-23 00:37:36 +10:00
parent dd30d144ae
commit 763e387c62

View File

@ -132,13 +132,6 @@ func (cl *Client) TorrentReadAt(ih InfoHash, off int64, p []byte) (n int, err er
} }
t.lastReadPiece = int(index) t.lastReadPiece = int(index)
piece := t.Pieces[index] piece := t.Pieces[index]
if !piece.EverHashed {
cl.queuePieceCheck(t, index)
}
if piece.Hashing {
err = ErrDataNotReady
return
}
pieceOff := pp.Integer(off % int64(t.PieceLength(0))) pieceOff := pp.Integer(off % int64(t.PieceLength(0)))
high := int(t.PieceLength(index) - pieceOff) high := int(t.PieceLength(index) - pieceOff)
if high < len(p) { if high < len(p) {