move need_save_resume_data to when a piece is completed instead of when it's written to disk
This commit is contained in:
parent
2b65d104c7
commit
ef0abcb359
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue