don't prevent sending bytes just because the peer was waiting on the disk

This commit is contained in:
Arvid Norberg 2012-03-09 01:19:30 +00:00
parent 97b4012685
commit ce3405c0ce
1 changed files with 7 additions and 1 deletions

View File

@ -4751,7 +4751,7 @@ namespace libtorrent
{
if (m_disconnecting) return;
if (m_channel_state[upload_channel] & (peer_info::bw_network | peer_info::bw_limit)) return;
if (m_channel_state[upload_channel] & peer_info::bw_network) return;
shared_ptr<torrent> t = m_torrent.lock();
@ -4830,6 +4830,12 @@ namespace libtorrent
}
}
}
else
{
if (m_channel_state[upload_channel] & peer_info::bw_disk)
m_ses.dec_disk_queue(upload_channel);
m_channel_state[upload_channel] &= ~peer_info::bw_disk;
}
if (!can_write())
{