fix issue when peer list is full, previously we would sometimes reject new connections

This commit is contained in:
Arvid Norberg
2011-11-24 17:50:57 +00:00
parent 9250b551d9
commit cab1f3d207
7 changed files with 91 additions and 26 deletions

View File

@@ -3454,12 +3454,21 @@ namespace libtorrent
|| ec == error_code(errors::self_connection)
|| ec == error_code(errors::torrent_paused))
++m_ses.m_uninteresting_peers;
if (ec == error_code(errors::timed_out))
++m_ses.m_transport_timeout_peers;
if (ec == error_code(errors::timed_out_inactivity)
|| ec == error_code(errors::timed_out_no_request)
|| ec == error_code(errors::timed_out_no_interest))
++m_ses.m_timeout_peers;
if (ec == error_code(errors::no_memory))
++m_ses.m_no_memory_peers;
if (ec == error_code(errors::too_many_connections))
++m_ses.m_too_many_peers;
if (ec == error_code(errors::timed_out_no_handshake))
++m_ses.m_connect_timeouts;
#endif