back port uninitialized variable access fix from libtorrent_aio

This commit is contained in:
Arvid Norberg 2013-03-18 05:46:08 +00:00
parent 59a95c8ed6
commit 07984fa5e0
1 changed files with 4 additions and 3 deletions

View File

@ -7522,13 +7522,14 @@ namespace libtorrent
#endif
if (next_announce <= now) next_announce = now;
// don't re-issue the timer if it's the same expiration time as last time
// if m_waiting_tracker is false, expires_at() is undefined
if (m_waiting_tracker && m_tracker_timer.expires_at() == next_announce) return;
m_waiting_tracker = true;
error_code ec;
boost::weak_ptr<torrent> self(shared_from_this());
// don't re-issue the timer if it's the same expiration time as last time
if (m_tracker_timer.expires_at() == next_announce) return;
#if defined TORRENT_ASIO_DEBUGGING
add_outstanding_async("tracker::on_tracker_announce_disp");
#endif