fix invariant check failure

This commit is contained in:
Arvid Norberg 2009-05-30 04:27:26 +00:00
parent d25d09cb70
commit 31cae31ccc
1 changed files with 8 additions and 8 deletions

View File

@ -1329,6 +1329,14 @@ namespace libtorrent
m_have_piece.set_bit(index);
++m_num_pieces;
if (is_seed())
{
m_peer_info->seed = true;
m_upload_only = true;
disconnect_if_redundant();
if (is_disconnecting()) return;
}
// only update the piece_picker if
// we have the metadata and if
// we're not a seed (in which case
@ -1371,14 +1379,6 @@ namespace libtorrent
p->superseed_piece(t->get_piece_to_super_seed(p->get_bitfield()));
}
}
if (is_seed())
{
m_peer_info->seed = true;
m_upload_only = true;
disconnect_if_redundant();
if (is_disconnecting()) return;
}
}
}