prevent new connections when shutting down

This commit is contained in:
Arvid Norberg 2008-09-30 01:14:27 +00:00
parent 892a953a21
commit 195521db65
1 changed files with 2 additions and 1 deletions

View File

@ -1143,7 +1143,8 @@ namespace aux {
int free_slots = m_half_open.free_slots(); int free_slots = m_half_open.free_slots();
if (!m_torrents.empty() if (!m_torrents.empty()
&& free_slots > -m_half_open.limit() && free_slots > -m_half_open.limit()
&& num_connections() < m_max_connections) && num_connections() < m_max_connections
&& !m_abort)
{ {
// this is the maximum number of connections we will // this is the maximum number of connections we will
// attempt this tick // attempt this tick