fixed bug when torrent file have announce-list but no valid trackers. #444

This commit is contained in:
Arvid Norberg 2008-12-16 01:26:35 +00:00
parent f8ea5ffa07
commit e4ed68918b
2 changed files with 15 additions and 10 deletions

View File

@ -25,6 +25,8 @@ release 0.14.2
* removed support for boost-1.33 and earlier (probably didn't work) * removed support for boost-1.33 and earlier (probably didn't work)
* fixed potential freezes issues at shutdown * fixed potential freezes issues at shutdown
* improved error message for python setup script * improved error message for python setup script
* fixed bug when torrent file included announce-list, but no valid
tracker urls
release 0.14.1 release 0.14.1

View File

@ -575,6 +575,8 @@ namespace libtorrent
} }
} }
if (!m_urls.empty())
{
// shuffle each tier // shuffle each tier
std::vector<announce_entry>::iterator start = m_urls.begin(); std::vector<announce_entry>::iterator start = m_urls.begin();
std::vector<announce_entry>::iterator stop; std::vector<announce_entry>::iterator stop;
@ -590,6 +592,7 @@ namespace libtorrent
} }
std::random_shuffle(start, stop); std::random_shuffle(start, stop);
} }
}
if (m_urls.empty()) if (m_urls.empty())