diff --git a/src/piece_picker.cpp b/src/piece_picker.cpp index 4e5e89787..a9eb0ee6d 100644 --- a/src/piece_picker.cpp +++ b/src/piece_picker.cpp @@ -852,6 +852,8 @@ namespace libtorrent for (std::vector::iterator i = m_piece_map.begin() , end(m_piece_map.end()); i != end; ++i) { + // we don't maintain peer count for pieces we have + if (i->index == piece_pos::have_index) continue; TORRENT_ASSERT(i->peer_count > 0); --i->peer_count; }