From ea91a6e07722fe00c7e22a59707d238c55ee09cc Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 6 May 2009 22:31:17 +0000 Subject: [PATCH] fixed inverted peer connect rank. Used to connect to the least likely to work peer, instead of the most likely --- ChangeLog | 2 ++ src/policy.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fbf78cc32..8b9e9f589 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,8 @@ release 0.14.4 * connect candidate calculation fix * tightened up disk cache memory usage * fixed magnet link parser to accept hex-encoded info-hashes + * fixed inverted logic when picking which peers to connect to + (should mean a slight performance improvement) release 0.14.3 diff --git a/src/policy.cpp b/src/policy.cpp index 86e096694..0f398d5fe 100644 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -472,7 +472,7 @@ namespace libtorrent if (!is_connect_candidate(pe, m_finished)) continue; if (candidate != m_peers.end() - && !compare_peer(*candidate, pe, external_ip)) continue; + && compare_peer(*candidate, pe, external_ip)) continue; if (pe.last_connected && session_time - pe.last_connected <