forked from premiere/premiere-libtorrent
fixed piece picker assert (would change the peer_count for pieces we have, and assert on them)
This commit is contained in:
parent
3e23029670
commit
7b6261a63a
|
@ -852,6 +852,8 @@ namespace libtorrent
|
|||
for (std::vector<piece_pos>::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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue