move need_save_resume_data to when a piece is completed instead of when it's written to disk

This commit is contained in:
Arvid Norberg 2010-05-16 23:12:37 +00:00
parent 2b65d104c7
commit ef0abcb359
1 changed files with 2 additions and 2 deletions

View File

@ -739,8 +739,6 @@ namespace libtorrent
// add_piece() multiple times // add_piece() multiple times
if (picker().is_finished(block_finished)) return; if (picker().is_finished(block_finished)) return;
m_need_save_resume_data = true;
picker().mark_as_finished(block_finished, 0); picker().mark_as_finished(block_finished, 0);
} }
@ -2216,6 +2214,8 @@ namespace libtorrent
, index)); , index));
} }
m_need_save_resume_data = true;
remove_time_critical_piece(index, true); remove_time_critical_piece(index, true);
bool was_finished = m_picker->num_filtered() + num_have() bool was_finished = m_picker->num_filtered() + num_have()