assert fixes

This commit is contained in:
Arvid Norberg 2009-05-12 18:24:16 +00:00
parent 649f95c932
commit 46c286eea3
2 changed files with 3 additions and 2 deletions

View File

@ -3010,8 +3010,6 @@ namespace libtorrent
TORRENT_ASSERT(!m_rc4_encrypted || m_RC4_handler.get());
#endif
if (is_seed() && m_initialized) TORRENT_ASSERT(upload_only());
if (!in_handshake())
{
TORRENT_ASSERT(m_sent_handshake);

View File

@ -1229,6 +1229,9 @@ namespace libtorrent
{
INVARIANT_CHECK;
// no peer should be interesting if we're finished
TORRENT_ASSERT(!m_torrent->is_finished());
if (c.in_handshake()) return;
c.send_interested();
if (c.has_peer_choked()