From 665d508bc399f1fa45f13f2836d45ad8821e2014 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 23 Jun 2008 13:02:41 +0000 Subject: [PATCH] piece picker fix --- src/piece_picker.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/piece_picker.cpp b/src/piece_picker.cpp index 2fbe94c96..ce3457766 100755 --- a/src/piece_picker.cpp +++ b/src/piece_picker.cpp @@ -1787,6 +1787,9 @@ namespace libtorrent = std::find_if(m_downloads.begin(), m_downloads.end(), has_index(block.piece_index)); TORRENT_ASSERT(i != m_downloads.end()); block_info& info = i->info[block.block_index]; + if (info.state == block_info::state_none) + mark_as_downloading(block, peer, piece_picker::none); + info.peer = peer; TORRENT_ASSERT(info.state == block_info::state_requested); if (info.state == block_info::state_requested) --i->requested;