From 4f24fe1e6231e72aab2144d18ca7339f50118f11 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 26 Nov 2010 20:48:04 +0000 Subject: [PATCH] fixed bug when allow_multiple_connections_per_ip was enabled --- ChangeLog | 1 + src/policy.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4c230d948..6c3ed0681 100644 --- a/ChangeLog +++ b/ChangeLog @@ -57,6 +57,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * fixed bug when allow_multiple_connections_per_ip was enabled * potential WOW64 fix for unbuffered I/O (windows) * expose set_alert_queue_size_limit to python binding * support dht nodes in magnet links diff --git a/src/policy.cpp b/src/policy.cpp index cd5ae71eb..e9972f6ed 100644 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -889,7 +889,7 @@ namespace libtorrent std::pair range = find_peers(remote.address()); iterator i = std::find_if(range.first, range.second , match_peer_endpoint(remote)); - if (i != m_peers.end()) + if (i != range.second) { policy::peer& pp = **i; if (pp.connection)