From d4c5d5835a6c7ad7ceda7922338823cd0ca329e8 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 5 Oct 2008 04:44:29 +0000 Subject: [PATCH] another state fix where mutliple torrent_finished_alerts could be generated --- src/torrent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 6644a9556..2e47f003c 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3450,12 +3450,12 @@ namespace libtorrent if (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 { m_complete_sent = true; - finished(); + if (m_state != torrent_status::finished) finished(); } #ifndef TORRENT_DISABLE_EXTENSIONS