fixed bug in connection queue

This commit is contained in:
Arvid Norberg 2008-03-19 19:27:28 +00:00
parent 66fc7e3b2b
commit e9e74a928c
1 changed files with 4 additions and 2 deletions

View File

@ -148,7 +148,8 @@ namespace libtorrent
m_log << log_time() << " " << free_slots() << std::endl;
#endif
if (m_num_connecting >= m_half_open_limit) return;
if (m_num_connecting >= m_half_open_limit
&& m_half_open_limit > 0) return;
if (m_queue.empty())
{
@ -189,7 +190,8 @@ namespace libtorrent
m_log << log_time() << " " << free_slots() << std::endl;
#endif
if (m_num_connecting >= m_half_open_limit) break;
if (m_num_connecting >= m_half_open_limit
&& m_half_open_limit > 0) break;
i = std::find_if(i, m_queue.end(), boost::bind(&entry::connecting, _1) == false);
}
}