another state fix where mutliple torrent_finished_alerts could be generated

This commit is contained in:
Arvid Norberg 2008-10-05 04:44:29 +00:00
parent 8f665e949f
commit d4c5d5835a
1 changed files with 2 additions and 2 deletions

View File

@ -3450,12 +3450,12 @@ namespace libtorrent
if (m_ses.m_auto_manage_time_scaler > 1) if (m_ses.m_auto_manage_time_scaler > 1)
m_ses.m_auto_manage_time_scaler = 1; m_ses.m_auto_manage_time_scaler = 1;
if (is_finished()) finished(); if (is_finished() && m_state != torrent_status::finished) finished();
} }
else else
{ {
m_complete_sent = true; m_complete_sent = true;
finished(); if (m_state != torrent_status::finished) finished();
} }
#ifndef TORRENT_DISABLE_EXTENSIONS #ifndef TORRENT_DISABLE_EXTENSIONS