]> Sergey Matveev's repositories - btrtrc.git/commit
Fix piece getting queued for hash multiple times
authorMatt Joiner <anacrolix@gmail.com>
Thu, 5 Nov 2020 21:39:56 +0000 (08:39 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 5 Nov 2020 21:39:56 +0000 (08:39 +1100)
commitdcb2c0bb4116be0025d9ffa0bc18df70e383b4b4
tree4bd6824410bdff486ad0a9ef3e4c8a51b0e59727
parent131037dd9f21aafe315158dc7b46236fdc8c8fbf
Fix piece getting queued for hash multiple times

Pieces could get queued for hash multiple times when we receive chunks if the piece starts getting hashed before we're done writing all the chunks out. This was only found because piece hashing currently only checks the incomplete data, which is missing after the first piece hash passes, the data is marked complete, then the subsequently queued hash has nothing to read.
peerconn.go
piece.go