Fixed bug in peer_connection::set_send_quota when m_send_quota_limit=-1

This commit is contained in:
Magnus Jonsson 2003-12-15 17:42:28 +00:00
parent 9a5c7faf69
commit ac40cc37c5
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ libtorrent::peer_connection::~peer_connection()
void libtorrent::peer_connection::set_send_quota(int num_bytes)
{
assert(num_bytes <= m_send_quota_limit || m_send_quota_limit == -1);
if (num_bytes > m_send_quota_limit) num_bytes = m_send_quota_limit;
if (num_bytes > m_send_quota_limit && m_send_quota_limit!=-1) num_bytes = m_send_quota_limit;
m_send_quota = num_bytes;
m_send_quota_left = num_bytes;