From 68ffd3c47c004c31ba18e7f795dec328fa947342 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 4 Jan 2015 21:14:46 +0000 Subject: [PATCH] restore breakage of recalculate_automanaged_torrents, and fix the logic for checking torrents --- src/session_impl.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index d448101f7..8f61ed3b6 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -3542,14 +3542,16 @@ retry: torrent* t = i->second.get(); TORRENT_ASSERT(t); - if (!t->has_error()) + if (t->state() == torrent_status::checking_files + && !t->has_error() + && (t->is_auto_managed() || t->allows_peers())) { - if (t->state() == torrent_status::checking_files) - { - checking.push_back(t); - continue; - } + checking.push_back(t); + continue; + } + if (t->is_auto_managed() && !t->has_error()) + { TORRENT_ASSERT(t->m_resume_data_loaded || !t->valid_metadata()); // this torrent is auto managed, add it to // the list (depending on if it's a seed or not)