From e9e74a928cecdf66413a353572a152e657a8e1ec Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 19 Mar 2008 19:27:28 +0000 Subject: [PATCH] fixed bug in connection queue --- src/connection_queue.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connection_queue.cpp b/src/connection_queue.cpp index c54d723b5..aca8f25da 100644 --- a/src/connection_queue.cpp +++ b/src/connection_queue.cpp @@ -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); } }