bandwidth management fix + fix to http tracker connection request builder
This commit is contained in:
parent
9c0e9701d9
commit
f5fe27e691
|
@ -406,7 +406,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
if (!url_has_argument(request, "numwant"))
|
if (!url_has_argument(request, "numwant"))
|
||||||
{
|
{
|
||||||
m_send_buffer += "&numwant=";
|
m_send_buffer += "numwant=";
|
||||||
m_send_buffer += boost::lexical_cast<std::string>(
|
m_send_buffer += boost::lexical_cast<std::string>(
|
||||||
std::min(req.num_want, 999));
|
std::min(req.num_want, 999));
|
||||||
m_send_buffer += '&';
|
m_send_buffer += '&';
|
||||||
|
|
|
@ -1860,8 +1860,8 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
int max_assignable = m_bandwidth_limit[channel].max_assignable();
|
int max_assignable = m_bandwidth_limit[channel].max_assignable();
|
||||||
return max_assignable > max_bandwidth_block_size
|
return max_assignable > max_bandwidth_block_size
|
||||||
|| (m_bandwidth_limit[channel].throttle() < m_bandwidth_limit[channel].max_assignable())
|
|| (m_bandwidth_limit[channel].throttle() < max_bandwidth_block_size
|
||||||
&& max_assignable > 0;
|
&& max_assignable > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void torrent::request_bandwidth(int channel
|
void torrent::request_bandwidth(int channel
|
||||||
|
|
Loading…
Reference in New Issue