add web_seed_name_lookup_retry to session_settings (#1674)

add web_seed_name_lookup_retry to session_settings to control web seed
name lookup retry in seconds, default is 1800 seconds
This commit is contained in:
ximply 2017-02-07 14:34:52 +08:00 committed by Arvid Norberg
parent 692759ba81
commit c4d96c7aa9
4 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,4 @@
* add web_seed_name_lookup_retry to session_settings
* slightly improve proxy settings backwards compatibility * slightly improve proxy settings backwards compatibility
* add function to get default settings * add function to get default settings
* updating super seeding would include the torrent in state_update_alert * updating super seeding would include the torrent in state_update_alert

View File

@ -795,6 +795,9 @@ namespace libtorrent
// time to wait until a new retry of a web seed takes place // time to wait until a new retry of a web seed takes place
urlseed_wait_retry, urlseed_wait_retry,
// time to wait until a new retry of a web seed name lookup
web_seed_name_lookup_retry,
// sets the upper limit on the total number of files this session will // sets the upper limit on the total number of files this session will
// keep open. The reason why files are left open at all is that some // keep open. The reason why files are left open at all is that some
// anti virus software hooks on every file close, and scans the file // anti virus software hooks on every file close, and scans the file

View File

@ -236,6 +236,7 @@ namespace libtorrent
SET(urlseed_pipeline_size, 5, 0), SET(urlseed_pipeline_size, 5, 0),
SET_NOPREV(urlseed_max_request_bytes, 16 * 1024 * 1024, 0), SET_NOPREV(urlseed_max_request_bytes, 16 * 1024 * 1024, 0),
SET(urlseed_wait_retry, 30, 0), SET(urlseed_wait_retry, 30, 0),
SET_NOPREV(web_seed_name_lookup_retry, 1800, 0),
SET(file_pool_size, 40, 0), SET(file_pool_size, 40, 0),
SET(max_failcount, 3, &session_impl::update_max_failcount), SET(max_failcount, 3, &session_impl::update_max_failcount),
SET(min_reconnect_time, 60, 0), SET(min_reconnect_time, 60, 0),

View File

@ -6511,8 +6511,8 @@ namespace libtorrent
, web->url.c_str(), e.value(), e.message().c_str()); , web->url.c_str(), e.value(), e.message().c_str());
#endif #endif
// unavailable, retry in 30 minutes // unavailable, retry in `settings_pack::web_seed_name_lookup_retry` seconds
web->retry = aux::time_now() + minutes(30); web->retry = aux::time_now() + seconds(settings().get_int(settings_pack::web_seed_name_lookup_retry));
return; return;
} }