fixed inconsistency between peer's request list and piece picker in rare cases

This commit is contained in:
Arvid Norberg 2009-07-02 06:43:05 +00:00
parent ece98a8ef6
commit 52f39a9af0
1 changed files with 4 additions and 1 deletions

View File

@ -1070,6 +1070,9 @@ namespace libtorrent
// if the peer is in parole mode, keep the request // if the peer is in parole mode, keep the request
if (peer_info_struct() && peer_info_struct()->on_parole) if (peer_info_struct() && peer_info_struct()->on_parole)
{ {
// we should only add it if the block is marked as
// busy in the piece-picker
if (remove_from_picker)
m_request_queue.insert(m_request_queue.begin(), b); m_request_queue.insert(m_request_queue.begin(), b);
} }
else if (!t->is_seed() && remove_from_picker) else if (!t->is_seed() && remove_from_picker)