fix checking behavior when pausing/resuming the session
This commit is contained in:
parent
4a914852cc
commit
df003ef57c
|
@ -834,6 +834,9 @@ namespace libtorrent
|
||||||
void set_apply_ip_filter(bool b);
|
void set_apply_ip_filter(bool b);
|
||||||
bool apply_ip_filter() const { return m_apply_ip_filter; }
|
bool apply_ip_filter() const { return m_apply_ip_filter; }
|
||||||
|
|
||||||
|
void queue_torrent_check();
|
||||||
|
void dequeue_torrent_check();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void on_files_deleted(int ret, disk_io_job const& j);
|
void on_files_deleted(int ret, disk_io_job const& j);
|
||||||
|
@ -857,9 +860,6 @@ namespace libtorrent
|
||||||
void update_peer_interest(bool was_finished);
|
void update_peer_interest(bool was_finished);
|
||||||
void prioritize_udp_trackers();
|
void prioritize_udp_trackers();
|
||||||
|
|
||||||
void queue_torrent_check();
|
|
||||||
void dequeue_torrent_check();
|
|
||||||
|
|
||||||
void parse_response(const entry& e, std::vector<peer_entry>& peer_list);
|
void parse_response(const entry& e, std::vector<peer_entry>& peer_list);
|
||||||
|
|
||||||
void update_tracker_timer(ptime now);
|
void update_tracker_timer(ptime now);
|
||||||
|
|
|
@ -1397,8 +1397,8 @@ namespace aux {
|
||||||
{
|
{
|
||||||
torrent& t = *i->second;
|
torrent& t = *i->second;
|
||||||
t.do_resume();
|
t.do_resume();
|
||||||
|
if (t.should_check_files()) t.queue_torrent_check();
|
||||||
}
|
}
|
||||||
if (!m_queued_for_checking.empty()) m_queued_for_checking.front()->start_checking();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void session_impl::abort()
|
void session_impl::abort()
|
||||||
|
@ -2717,7 +2717,7 @@ namespace aux {
|
||||||
// waiting to be checked. I have never seen this, and I can't
|
// waiting to be checked. I have never seen this, and I can't
|
||||||
// see a way for it to happen. But, if it does, start one of
|
// see a way for it to happen. But, if it does, start one of
|
||||||
// the queued torrents
|
// the queued torrents
|
||||||
if (num_checking == 0 && num_queued > 0)
|
if (num_checking == 0 && num_queued > 0 && !m_paused)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(false);
|
TORRENT_ASSERT(false);
|
||||||
check_queue_t::iterator i = std::min_element(m_queued_for_checking.begin()
|
check_queue_t::iterator i = std::min_element(m_queued_for_checking.begin()
|
||||||
|
|
Loading…
Reference in New Issue