diff --git a/ChangeLog b/ChangeLog index 78cf8d247..20cfd8001 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 6e7002c5d..743df46ff 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -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 diff --git a/src/torrent.cpp b/src/torrent.cpp index b34a52685..72bb04b4d 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -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(flags); state_updated();