fixed time critical piece accounting in the request queue

This commit is contained in:
Arvid Norberg 2012-05-12 07:14:07 +00:00
parent 402d6bb6b6
commit e74fc839e9
2 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
* fixed time critical piece accounting in the request queue
* fixed semantics of rate_limit_utp to also ignore per-torrent limits
* fixed piece sorting bug of deadline pieces
* fixed python binding build on Mac OS and BSD

View File

@ -2207,6 +2207,8 @@ namespace libtorrent
{
if (i->block != b) continue;
in_req_queue = true;
if (i - m_request_queue.begin() < m_queued_time_critical)
--m_queued_time_critical;
m_request_queue.erase(i);
break;
}
@ -3070,6 +3072,9 @@ namespace libtorrent
// the block, just ignore to cancel it.
if (rit == m_request_queue.end()) return;
if (rit - m_request_queue.begin() < m_queued_time_critical)
--m_queued_time_critical;
t->picker().abort_download(block, peer_info_struct());
m_request_queue.erase(rit);
// since we found it in the request queue, it means it hasn't been