optimize PEX to trigger earlier, and only start applying the load-balancing logic when it's needed

This commit is contained in:
Arvid Norberg
2013-08-04 05:09:20 +00:00
parent 11fd428c46
commit 27ea092b51
2 changed files with 15 additions and 4 deletions

View File

@@ -108,7 +108,7 @@ void test_pex()
torrent_status st1;
torrent_status st2;
torrent_status st3;
for (int i = 0; i < 15; ++i)
for (int i = 0; i < 50; ++i)
{
print_alerts(ses1, "ses1");
print_alerts(ses2, "ses2");
@@ -129,7 +129,7 @@ void test_pex()
// through session 2
if (st3.state == torrent_status::seeding) break;
test_sleep(1000);
test_sleep(100);
}
TEST_CHECK(st1.num_peers == 2 && st2.num_peers == 2 && st3.num_peers == 2)