support banning web seeds that send corrupt data

This commit is contained in:
Arvid Norberg
2012-03-24 01:29:31 +00:00
parent bad2857cbe
commit 6fcc469aef
10 changed files with 194 additions and 83 deletions

View File

@@ -3503,6 +3503,8 @@ namespace libtorrent
m_disconnect_started = true;
#endif
if (m_disconnecting) return;
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING
switch (error)
{
@@ -3585,7 +3587,6 @@ namespace libtorrent
// we cannot do this in a constructor
TORRENT_ASSERT(m_in_constructor == false);
if (error > 0) m_failed = true;
if (m_disconnecting) return;
boost::intrusive_ptr<peer_connection> me(this);
INVARIANT_CHECK;
@@ -5884,7 +5885,7 @@ namespace libtorrent
}
}
#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS
if (m_peer_info)
if (m_peer_info && type() == bittorrent_connection)
{
policy::const_iterator i = t->get_policy().begin_peer();
policy::const_iterator end = t->get_policy().end_peer();