]> Sergey Matveev's repositories - btrtrc.git/commitdiff
TorrentReadAt shouldn't care about verification state
authorMatt Joiner <anacrolix@gmail.com>
Thu, 22 May 2014 14:37:36 +0000 (00:37 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 22 May 2014 14:37:36 +0000 (00:37 +1000)
client.go

index 00f65a0a69bf7eee32c015583e0636b11978b21f..16c434a27986547369279795eba06e8f81986370 100644 (file)
--- a/client.go
+++ b/client.go
@@ -132,13 +132,6 @@ func (cl *Client) TorrentReadAt(ih InfoHash, off int64, p []byte) (n int, err er
        }
        t.lastReadPiece = int(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)))
        high := int(t.PieceLength(index) - pieceOff)
        if high < len(p) {