From 56a4b8412a12f4946998b2c709cfbd9abf530428 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 3 May 2007 01:49:14 +0000 Subject: [PATCH] restored the faster connection behavior --- src/policy.cpp | 4 ++-- src/torrent.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/policy.cpp b/src/policy.cpp index 04891d102..a0302c0cb 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -724,8 +724,8 @@ namespace libtorrent } } - if (m_torrent->want_more_peers()) - connect_one_peer(); + while (m_torrent->want_more_peers()) + if (!connect_one_peer()) break; // ------------------------ // upload shift diff --git a/src/torrent.cpp b/src/torrent.cpp index 445b7cddc..906401a4d 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -609,6 +609,7 @@ namespace libtorrent bind(&torrent::on_peer_name_lookup, shared_from_this(), _1, _2, i->pid))); } } + m_policy->pulse(); if (m_ses.m_alerts.should_post(alert::info)) {