fixed bug where upload ratio was not being respected

This commit is contained in:
Arvid Norberg 2005-10-15 17:21:49 +00:00
parent ea0e803fff
commit a44c3c7811
1 changed files with 1 additions and 1 deletions

View File

@ -2513,7 +2513,7 @@ namespace libtorrent
buffer::interval_type send_buffer = m_send_buffer.data();
// we have data that's scheduled for sending
int to_send = std::min(send_buffer.first.end - send_buffer.first.begin
, m_ul_bandwidth_quota.left());
, amount_to_send);
int sent = m_socket->send(send_buffer.first.begin, to_send);
if (sent == send_buffer.first.end - send_buffer.first.end