merge bittorrent-slow start fix from RC_1_0

This commit is contained in:
arvidn 2015-07-27 16:53:25 -07:00
parent f34f09ca58
commit 29c618c3e5
1 changed files with 7 additions and 2 deletions

View File

@ -4804,8 +4804,13 @@ namespace libtorrent
// if our download rate isn't increasing significantly anymore, end slow
// start. The 10kB is to have some slack here.
if (m_slow_start && m_downloaded_last_second > 0
&& m_downloaded_last_second + 10000
// we can't do this when we're choked, because we aren't sending any
// requests yet, so there hasn't been an opportunity to ramp up the
// connection yet.
if (m_slow_start
&& !m_peer_choked
&& m_downloaded_last_second > 0
&& m_downloaded_last_second + 5000
>= m_statistics.last_payload_downloaded())
{
m_slow_start = false;