assert that trackers are not announced to while checking files

This commit is contained in:
arvidn 2017-08-06 17:30:07 +02:00 committed by Arvid Norberg
parent 1f3730fa5a
commit 2b98951ace
1 changed files with 2 additions and 0 deletions

View File

@ -3118,6 +3118,7 @@ namespace {
, address const& bind_interface) , address const& bind_interface)
{ {
TORRENT_ASSERT(is_single_thread()); TORRENT_ASSERT(is_single_thread());
TORRENT_ASSERT(e == tracker_request::stopped || state() != torrent_status::checking_files);
INVARIANT_CHECK; INVARIANT_CHECK;
if (m_trackers.empty()) if (m_trackers.empty())
@ -10239,6 +10240,7 @@ namespace {
void torrent::start_announcing() void torrent::start_announcing()
{ {
TORRENT_ASSERT(is_single_thread()); TORRENT_ASSERT(is_single_thread());
TORRENT_ASSERT(state() != torrent_status::checking_files);
if (is_paused()) if (is_paused())
{ {
#ifndef TORRENT_DISABLE_LOGGING #ifndef TORRENT_DISABLE_LOGGING