made torrent::replace_trackers() start or stop announcing depending on if trackers were added or cleared

This commit is contained in:
Arvid Norberg 2008-09-24 02:22:12 +00:00
parent bd44d730cc
commit 2e0d0046d2
1 changed files with 2 additions and 0 deletions

View File

@ -1998,6 +1998,8 @@ namespace libtorrent
if (m_currently_trying_tracker >= (int)m_trackers.size()) if (m_currently_trying_tracker >= (int)m_trackers.size())
m_currently_trying_tracker = (int)m_trackers.size()-1; m_currently_trying_tracker = (int)m_trackers.size()-1;
m_last_working_tracker = -1; m_last_working_tracker = -1;
if (!m_trackers.empty()) start_announcing();
else stop_announcing();
} }
void torrent::choke_peer(peer_connection& c) void torrent::choke_peer(peer_connection& c)