forked from premiere/premiere-libtorrent
fixed typo. made it possible to set max_outstanding_disk_bytes_per_connection to 0
This commit is contained in:
parent
039ee486af
commit
d5164b1b1e
|
@ -324,7 +324,7 @@ namespace libtorrent
|
||||||
// pending in the disk write queue before its download
|
// pending in the disk write queue before its download
|
||||||
// rate is being throttled. This prevents fast downloads
|
// rate is being throttled. This prevents fast downloads
|
||||||
// to slow medias to allocate more and more memory
|
// 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.
|
// to not completely disrupt normal downloads.
|
||||||
int max_outstanding_disk_bytes_per_connection;
|
int max_outstanding_disk_bytes_per_connection;
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ namespace libtorrent
|
||||||
int handshake_timeout;
|
int handshake_timeout;
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_DHT
|
#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
|
// tracker is online
|
||||||
bool use_dht_as_fallback;
|
bool use_dht_as_fallback;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2015,7 +2015,7 @@ namespace libtorrent
|
||||||
TORRENT_ASSERT(m_channel_state[download_channel] == peer_info::bw_idle);
|
TORRENT_ASSERT(m_channel_state[download_channel] == peer_info::bw_idle);
|
||||||
m_download_queue.erase(b);
|
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<performance_alert>())
|
&& t->alerts().should_post<performance_alert>())
|
||||||
{
|
{
|
||||||
t->alerts().post_alert(performance_alert(t->get_handle()
|
t->alerts().post_alert(performance_alert(t->get_handle()
|
||||||
|
@ -4037,7 +4037,7 @@ namespace libtorrent
|
||||||
bool ret = (m_quota[download_channel] > 0
|
bool ret = (m_quota[download_channel] > 0
|
||||||
|| m_ignore_bandwidth_limits)
|
|| m_ignore_bandwidth_limits)
|
||||||
&& !m_connecting
|
&& !m_connecting
|
||||||
&& m_outstanding_writing_bytes <
|
&& m_outstanding_writing_bytes <=
|
||||||
m_ses.settings().max_outstanding_disk_bytes_per_connection;
|
m_ses.settings().max_outstanding_disk_bytes_per_connection;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue