From 94027cbea3868820c57542560211473327ec40d1 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 11 Feb 2011 07:10:47 +0000 Subject: [PATCH] fix failed invariant check by pausing torrents that are just completing checking and are auto-managed earlier --- src/torrent.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 60dbda212..c91dae71e 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1611,9 +1611,6 @@ namespace libtorrent if (ret == piece_manager::need_full_check) return; dequeue_torrent_check(); - // calling pause will also trigger the auto managed - // recalculation - if (m_auto_managed) pause(); files_checked(); } @@ -5248,6 +5245,10 @@ namespace libtorrent get_handle())); } + // calling pause will also trigger the auto managed + // recalculation + if (m_auto_managed) pause(); + // if this is an auto managed torrent, force a recalculation // of which torrents to have active if (m_auto_managed && m_ses.m_auto_manage_time_scaler > 1)