From 2b98951ace7cdad169f23a4c1bc84ca55f89a7b1 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 6 Aug 2017 17:30:07 +0200 Subject: [PATCH] assert that trackers are not announced to while checking files --- src/torrent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/torrent.cpp b/src/torrent.cpp index 504283542..2d97b0b20 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3118,6 +3118,7 @@ namespace { , address const& bind_interface) { TORRENT_ASSERT(is_single_thread()); + TORRENT_ASSERT(e == tracker_request::stopped || state() != torrent_status::checking_files); INVARIANT_CHECK; if (m_trackers.empty()) @@ -10239,6 +10240,7 @@ namespace { void torrent::start_announcing() { TORRENT_ASSERT(is_single_thread()); + TORRENT_ASSERT(state() != torrent_status::checking_files); if (is_paused()) { #ifndef TORRENT_DISABLE_LOGGING