merged policy change from RC_0_16

This commit is contained in:
Arvid Norberg 2013-01-13 02:58:59 +00:00
parent cb0059d952
commit e3595ee1c4
1 changed files with 0 additions and 22 deletions

View File

@ -860,28 +860,6 @@ namespace libtorrent
TORRENT_ASSERT(c.remote() == c.get_socket()->remote_endpoint(ec) || ec);
TORRENT_ASSERT(!m_torrent->is_paused());
aux::session_impl& ses = m_torrent->session();
if (m_torrent->num_peers() >= m_torrent->max_connections()
&& ses.num_connections() >= ses.settings().connections_limit
&& c.remote().address() != m_torrent->current_tracker().address())
{
#if defined TORRENT_LOGGING || defined TORRENT_VERBOSE_LOGGING
(*m_torrent->session().m_logger) << time_now_string()
<< " *** TOO MANY CONNECTIONS ["
" torrent: " << m_torrent->name() <<
" torrent peers: " << m_torrent->num_peers() <<
" torrent limit: " << m_torrent->max_connections() <<
" global peers: " << ses.num_connections() <<
" global limit: " << ses.settings().connections_limit <<
" global list peers " << int(m_peers.size()) <<
" global list limit: " << m_torrent->settings().max_peerlist_size <<
" ]\n";
#endif
c.disconnect(errors::too_many_connections);
return false;
}
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
if (c.remote().address() == m_torrent->current_tracker().address())
{