retry failed trackers a little bit sooner. make the exponential back-off not quite grow as fast

This commit is contained in:
Arvid Norberg
2012-03-24 15:15:36 +00:00
parent 6fcc469aef
commit 4d60adcaa9
5 changed files with 26 additions and 5 deletions

View File

@@ -396,6 +396,20 @@ int test_main()
error_code ec;
int ret = 0;
// make sure the retry interval keeps growing
// on failing announces
announce_entry ae("dummy");
int last = 0;
for (int i = 0; i < 10; ++i)
{
ae.failed(5);
int delay = ae.next_announce_in();
TEST_CHECK(delay > last);
last = delay;
fprintf(stderr, "%d, ", delay);
}
fprintf(stderr, "\n");
#if defined TORRENT_USE_OPENSSL
// test sign_rsa and verify_rsa
char private_key[1192];