per torrent bandwidth limiter fix

This commit is contained in:
Arvid Norberg 2008-01-13 22:27:33 +00:00
parent 5d196ed555
commit 3f4474caba
1 changed files with 2 additions and 1 deletions

View File

@ -2291,6 +2291,7 @@ namespace libtorrent
// skip forward in the queue until we find a prioritized peer
// or hit the front of it.
queue_t::reverse_iterator i = m_bandwidth_queue[channel].rbegin();
if (!non_prioritized)
while (i != m_bandwidth_queue[channel].rend() && i->non_prioritized) ++i;
m_bandwidth_queue[channel].insert(i.base(), bw_queue_entry<peer_connection>(
p, block_size, non_prioritized));