From 77c141fd6d536a78139692ff746bc61056b22b61 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 2 May 2007 19:50:07 +0000 Subject: [PATCH] fix to previous connection queue change --- src/policy.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/policy.cpp b/src/policy.cpp index 001a3ef0c..04891d102 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -724,12 +724,8 @@ namespace libtorrent } } - while (m_torrent->num_peers() < m_torrent->m_connections_quota.given) - { - if (!connect_one_peer()) - break; - } - + if (m_torrent->want_more_peers()) + connect_one_peer(); // ------------------------ // upload shift @@ -1201,8 +1197,7 @@ namespace libtorrent { INVARIANT_CHECK; - if (!m_torrent->want_more_peers()) - return false; + assert(m_torrent->want_more_peers()); bool succeed = false; while (!succeed)