fixed time critical piece accounting in the request queue
This commit is contained in:
parent
402d6bb6b6
commit
e74fc839e9
|
@ -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 semantics of rate_limit_utp to also ignore per-torrent limits
|
||||||
* fixed piece sorting bug of deadline pieces
|
* fixed piece sorting bug of deadline pieces
|
||||||
* fixed python binding build on Mac OS and BSD
|
* fixed python binding build on Mac OS and BSD
|
||||||
|
|
|
@ -2207,6 +2207,8 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
if (i->block != b) continue;
|
if (i->block != b) continue;
|
||||||
in_req_queue = true;
|
in_req_queue = true;
|
||||||
|
if (i - m_request_queue.begin() < m_queued_time_critical)
|
||||||
|
--m_queued_time_critical;
|
||||||
m_request_queue.erase(i);
|
m_request_queue.erase(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3070,6 +3072,9 @@ namespace libtorrent
|
||||||
// the block, just ignore to cancel it.
|
// the block, just ignore to cancel it.
|
||||||
if (rit == m_request_queue.end()) return;
|
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());
|
t->picker().abort_download(block, peer_info_struct());
|
||||||
m_request_queue.erase(rit);
|
m_request_queue.erase(rit);
|
||||||
// since we found it in the request queue, it means it hasn't been
|
// since we found it in the request queue, it means it hasn't been
|
||||||
|
|
Loading…
Reference in New Issue