need_save_resume_data() will no longer return true every 15 minutes. If clients want to save resume data regularly, they can call save_resume_data() with whatever interval they choose

This commit is contained in:
arvidn 2017-04-23 11:32:27 -04:00 committed by Arvid Norberg
parent 027fa5e290
commit e4dbd28920
3 changed files with 2 additions and 10 deletions

View File

@ -1,3 +1,4 @@
* need_save_resume_data() will no longer return true every 15 minutes
* make the file_status interface explicitly public types
* added resolver_cache_timeout setting for internal host name resolver
* make parse_magnet_uri take a string_view instead of std::string

View File

@ -527,13 +527,7 @@ namespace libtorrent {
void force_recheck();
void save_resume_data(int flags);
bool need_save_resume_data() const
{
// save resume data every 15 minutes regardless, just to
// keep stats up to date
return m_need_save_resume_data ||
aux::time_now32() - m_last_saved_resume > minutes(15);
}
bool need_save_resume_data() const { return m_need_save_resume_data; }
void set_need_save_resume()
{
@ -1360,8 +1354,6 @@ namespace libtorrent {
// m_num_verified = m_verified.count()
std::uint32_t m_num_verified = 0;
time_point32 m_last_saved_resume = aux::time_now32();
// if this torrent is running, this was the time
// when it was started. This is used to have a
// bias towards keeping seeding torrents that

View File

@ -8194,7 +8194,6 @@ namespace libtorrent {
}
m_need_save_resume_data = false;
m_last_saved_resume = aux::time_now32();
m_save_resume_flags = aux::numeric_cast<std::uint8_t>(flags);
state_updated();