merge active_tracker_limit increase and logging polish from RC_0_16

This commit is contained in:
Arvid Norberg 2012-09-27 23:50:15 +00:00
parent 5e2ff1a246
commit 4ea4d32554
4 changed files with 22 additions and 11 deletions

View File

@ -4,6 +4,7 @@
* fix uTP edge case where udp socket buffer fills up * fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP * fix nagle implementation in uTP
* raise the default number of torrents allowed to announce to trackers to 1600
* improve uTP slow start behavior * improve uTP slow start behavior
* fixed UDP socket error causing it to fail on Win7 * fixed UDP socket error causing it to fail on Win7
* update use of boost.system to not use deprecated functions * update use of boost.system to not use deprecated functions

View File

@ -1170,7 +1170,7 @@ namespace libtorrent
, active_downloads(3) , active_downloads(3)
, active_seeds(5) , active_seeds(5)
, active_dht_limit(88) // don't announce more than once every 40 seconds , active_dht_limit(88) // don't announce more than once every 40 seconds
, active_tracker_limit(360) // don't announce to trackers more than once every 5 seconds , active_tracker_limit(1600) // don't announce to trackers more than once every 1.125 seconds
, active_lsd_limit(60) // don't announce to local network more than once every 5 seconds , active_lsd_limit(60) // don't announce to local network more than once every 5 seconds
, active_limit(15) , active_limit(15)
, auto_manage_prefer_seeds(false) , auto_manage_prefer_seeds(false)

View File

@ -4090,14 +4090,14 @@ namespace aux {
--hard_limit; --hard_limit;
--type_limit; --type_limit;
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
t->log_to_all_peers(("AUTO MANAGER STARTING TORRENT: " + t->torrent_file().name()).c_str()); t->log_to_all_peers("AUTO MANAGER STARTING TORRENT");
#endif #endif
t->set_allow_peers(true); t->set_allow_peers(true);
} }
else else
{ {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
t->log_to_all_peers(("AUTO MANAGER PAUSING TORRENT: " + t->torrent_file().name()).c_str()); t->log_to_all_peers("AUTO MANAGER PAUSING TORRENT");
#endif #endif
// use graceful pause for auto-managed torrents // use graceful pause for auto-managed torrents
t->set_allow_peers(false, true); t->set_allow_peers(false, true);

View File

@ -745,7 +745,6 @@ namespace libtorrent
m_override_resume_data = true; m_override_resume_data = true;
init(); init();
start_announcing();
} }
#else #else
@ -856,7 +855,6 @@ namespace libtorrent
m_override_resume_data = true; m_override_resume_data = true;
init(); init();
start_announcing();
} }
#endif #endif
@ -1897,7 +1895,7 @@ namespace libtorrent
} }
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
else else
debug_log("fastresume data rejected accepted"); debug_log("fastresume data accepted");
#endif #endif
#endif #endif
@ -2263,13 +2261,25 @@ namespace libtorrent
TORRENT_ASSERT(m_ses.is_network_thread()); TORRENT_ASSERT(m_ses.is_network_thread());
INVARIANT_CHECK; INVARIANT_CHECK;
if (m_trackers.empty()) return; if (m_trackers.empty())
{
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("*** announce_with_tracker: no trackers");
#endif
return;
}
if (m_abort) e = tracker_request::stopped; if (m_abort) e = tracker_request::stopped;
// if we're not announcing to trackers, only allow // if we're not announcing to trackers, only allow
// stopping // stopping
if (e != tracker_request::stopped && !m_announce_to_trackers) return; if (e != tracker_request::stopped && !m_announce_to_trackers)
{
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("*** announce_with_tracker: event != stopped && !m_announce_to_trackers");
#endif
return;
}
TORRENT_ASSERT(m_allow_peers || e == tracker_request::stopped); TORRENT_ASSERT(m_allow_peers || e == tracker_request::stopped);
@ -2413,7 +2423,7 @@ namespace libtorrent
} }
} }
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log(" ==> TRACKER REQUEST \"%s\" event: %s abort: %d" debug_log("==> TRACKER REQUEST \"%s\" event: %s abort: %d"
, req.url.c_str() , req.url.c_str()
, (req.event==tracker_request::stopped?"stopped" , (req.event==tracker_request::stopped?"stopped"
:req.event==tracker_request::started?"started":"") :req.event==tracker_request::started?"started":"")
@ -7339,7 +7349,7 @@ namespace libtorrent
TORRENT_ASSERT(m_ses.is_network_thread()); TORRENT_ASSERT(m_ses.is_network_thread());
if (is_paused()) if (is_paused())
{ {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("start_announcing(), paused"); debug_log("start_announcing(), paused");
#endif #endif
return; return;
@ -7349,7 +7359,7 @@ namespace libtorrent
// request the metadata from // request the metadata from
if (!m_files_checked && valid_metadata()) if (!m_files_checked && valid_metadata())
{ {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("start_announcing(), files not checked (with valid metadata)"); debug_log("start_announcing(), files not checked (with valid metadata)");
#endif #endif
return; return;