added test for replace_trackers and removed incorrect assert
This commit is contained in:
parent
95d09070fb
commit
bab4695028
|
@ -1406,7 +1406,6 @@ namespace libtorrent
|
|||
|
||||
void torrent::replace_trackers(std::vector<announce_entry> const& urls)
|
||||
{
|
||||
TORRENT_ASSERT(!urls.empty());
|
||||
m_trackers = urls;
|
||||
if (m_currently_trying_tracker >= (int)m_trackers.size())
|
||||
m_currently_trying_tracker = (int)m_trackers.size()-1;
|
||||
|
|
|
@ -69,6 +69,9 @@ void test_transfer()
|
|||
remove_all("./tmp1");
|
||||
torrent_handle th = ses.add_torrent(torrent_file, "./tmp1");
|
||||
|
||||
std::vector<announce_entry> empty;
|
||||
th.replace_trackers(empty);
|
||||
|
||||
for (int i = 0; i < 30; ++i)
|
||||
{
|
||||
torrent_status s = th.status();
|
||||
|
|
Loading…
Reference in New Issue