diff --git a/docs/manual.html b/docs/manual.html index 4a0f33df8..cd8ec16bb 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -2676,7 +2676,8 @@ connection may delay the connection of other peers considerably.

ignore_limits_on_local_network, if set to true, upload, download and unchoke limits are ignored for peers on the local network.

connection_speed is the number of connection attempts that -are made per second.

+are made per second. If a number <= 0 is specified, it will default to +200 connections per second.

send_redundant_have controls if have messages will be sent to peers that already have the piece. This is typically not necessary, but it might be necessary for collecting statistics in some cases. diff --git a/docs/manual.rst b/docs/manual.rst index 7964f45da..716a76190 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -2684,7 +2684,8 @@ connection may delay the connection of other peers considerably. unchoke limits are ignored for peers on the local network. ``connection_speed`` is the number of connection attempts that -are made per second. +are made per second. If a number <= 0 is specified, it will default to +200 connections per second. ``send_redundant_have`` controls if have messages will be sent to peers that already have the piece. This is typically not necessary, diff --git a/src/session_impl.cpp b/src/session_impl.cpp index cc4feaa41..bc20fb02c 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -804,7 +804,6 @@ namespace detail INVARIANT_CHECK; - TORRENT_ASSERT(s.connection_speed > 0); TORRENT_ASSERT(s.file_pool_size > 0); // less than 5 seconds unchoke interval is insane @@ -814,6 +813,8 @@ namespace detail if (m_settings.cache_expiry != s.cache_expiry) m_disk_thread.set_cache_size(s.cache_expiry); m_settings = s; + if (m_settings.connection_speed <= 0) m_settings.connection_speed = 200; + m_files.resize(m_settings.file_pool_size); if (!s.auto_upload_slots) m_allowed_upload_slots = m_max_uploads; // replace all occurances of '\n' with ' '.