only write operations should trigger piece_picker::write_failed

This commit is contained in:
Arvid Norberg 2009-06-13 17:40:18 +00:00
parent 8af5211fb5
commit 2c34e0aa18
1 changed files with 1 additions and 2 deletions

View File

@ -356,8 +356,7 @@ namespace libtorrent
piece_block block_finished(j.piece, j.offset / block_size());
if (j.action == disk_io_job::write
|| j.action == disk_io_job::hash)
if (j.action == disk_io_job::write)
{
// we failed to write j.piece to disk tell the piece picker
if (has_picker() && j.piece >= 0) picker().write_failed(block_finished);