From 9197081618f988a9234e997279938976682dc4be Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 18 Feb 2010 03:53:16 +0000 Subject: [PATCH] announce edge case fixes --- src/torrent.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 70c310e1b..c81e7a498 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1139,6 +1139,7 @@ namespace libtorrent clear_error(); disconnect_all(errors::stopping_torrent); + stop_announcing(); m_owning_storage->async_release_files(); if (!m_picker) m_picker.reset(new piece_picker()); @@ -1377,6 +1378,7 @@ namespace libtorrent { announce_entry& ae = m_trackers[i]; if (settings().announce_to_all_tiers + && !settings().announce_to_all_trackers && sent_announce && ae.tier <= tier && tier != INT_MAX) @@ -1402,7 +1404,7 @@ namespace libtorrent if (req.event == tracker_request::none) { if (!ae.start_sent) req.event = tracker_request::started; - if (!ae.complete_sent && is_seed()) req.event = tracker_request::completed; + else if (!ae.complete_sent && is_seed()) req.event = tracker_request::completed; } if (!is_any(bind_interface)) req.bind_ip = bind_interface; @@ -3008,7 +3010,6 @@ namespace libtorrent break; } } - } void torrent::add_tracker(announce_entry const& url)