From ac40cc37c5a9c1c2155705cb232ae4c9129effe1 Mon Sep 17 00:00:00 2001 From: Magnus Jonsson Date: Mon, 15 Dec 2003 17:42:28 +0000 Subject: [PATCH] Fixed bug in peer_connection::set_send_quota when m_send_quota_limit=-1 --- src/peer_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 5e2779ab2..477cef8d4 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -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;