]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Include the piece number when logging piece hash errors
authorMatt Joiner <anacrolix@gmail.com>
Wed, 21 Aug 2019 11:00:47 +0000 (21:00 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 21 Aug 2019 11:00:47 +0000 (21:00 +1000)
torrent.go

index 70c8d42046f340944761efeca1b3bdadd179df4b..5fd2bbff3df2ef6a365459333bc188814e777a13 100644 (file)
@@ -745,7 +745,7 @@ func (t *Torrent) hashPiece(piece pieceIndex) (ret metainfo.Hash) {
                return
        }
        if err != io.ErrUnexpectedEOF && !os.IsNotExist(err) {
-               t.logger.Printf("unexpected error hashing piece with %T: %s", t.storage.TorrentImpl, err)
+               t.logger.Printf("unexpected error hashing piece %d through %T: %s", piece, t.storage.TorrentImpl, err)
        }
        return
 }