From d5164b1b1e7fd32f4758395d1c4f3b2c1270bcf5 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 12 May 2009 17:57:52 +0000 Subject: [PATCH] fixed typo. made it possible to set max_outstanding_disk_bytes_per_connection to 0 --- include/libtorrent/session_settings.hpp | 4 ++-- src/peer_connection.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/libtorrent/session_settings.hpp b/include/libtorrent/session_settings.hpp index c6544020e..f39dfd089 100644 --- a/include/libtorrent/session_settings.hpp +++ b/include/libtorrent/session_settings.hpp @@ -324,7 +324,7 @@ namespace libtorrent // pending in the disk write queue before its download // rate is being throttled. This prevents fast downloads // to slow medias to allocate more and more memory - // indefinitely. This should be set to at least 32 kB + // indefinitely. This should be set to at least 16 kB // to not completely disrupt normal downloads. int max_outstanding_disk_bytes_per_connection; @@ -334,7 +334,7 @@ namespace libtorrent int handshake_timeout; #ifndef TORRENT_DISABLE_DHT - // while this is true, the dht will note be used unless the + // while this is true, the dht will not be used unless the // tracker is online bool use_dht_as_fallback; #endif diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 94311a7f6..f9985c97c 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -2015,7 +2015,7 @@ namespace libtorrent TORRENT_ASSERT(m_channel_state[download_channel] == peer_info::bw_idle); m_download_queue.erase(b); - if (m_outstanding_writing_bytes >= m_ses.settings().max_outstanding_disk_bytes_per_connection + if (m_outstanding_writing_bytes > m_ses.settings().max_outstanding_disk_bytes_per_connection && t->alerts().should_post()) { t->alerts().post_alert(performance_alert(t->get_handle() @@ -4037,7 +4037,7 @@ namespace libtorrent bool ret = (m_quota[download_channel] > 0 || m_ignore_bandwidth_limits) && !m_connecting - && m_outstanding_writing_bytes < + && m_outstanding_writing_bytes <= m_ses.settings().max_outstanding_disk_bytes_per_connection; return ret;