fix for tracker-less torrents (they didn't announce with the tracker)

This commit is contained in:
Arvid Norberg 2008-08-27 15:15:41 +00:00
parent 238dcea91d
commit e2ae0a97e2
1 changed files with 8 additions and 1 deletions

View File

@ -306,6 +306,10 @@ namespace libtorrent
{
m_trackers.push_back(announce_entry(tracker_url));
m_torrent_file->add_tracker(tracker_url);
// we need to start announcing since we don't have any
// metadata. To receive peers to ask for it.
start_announcing();
}
}
@ -3919,7 +3923,10 @@ namespace libtorrent
void torrent::start_announcing()
{
if (is_paused()) return;
if (!m_files_checked) return;
// if we don't have metadata, we need to announce
// before checking files, to get peers to
// request the metadata from
if (!m_files_checked && valid_metadata()) return;
if (m_announcing) return;
m_announcing = true;