From 52f39a9af044f2e9ab2354eaa0d444c08bc00604 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 2 Jul 2009 06:43:05 +0000 Subject: [PATCH] fixed inconsistency between peer's request list and piece picker in rare cases --- src/peer_connection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 5a9796966..0b972d4f1 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -1070,7 +1070,10 @@ namespace libtorrent // if the peer is in parole mode, keep the request if (peer_info_struct() && peer_info_struct()->on_parole) { - m_request_queue.insert(m_request_queue.begin(), b); + // 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); } else if (!t->is_seed() && remove_from_picker) {