From 3d448402a45dd24bdde1963c1901201d8599a494 Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Sat, 20 Jun 2015 20:03:35 -0500 Subject: [PATCH] Don't attempt to find_peers in peer_list for i2p This closes #7 --- include/libtorrent/peer_list.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/libtorrent/peer_list.hpp b/include/libtorrent/peer_list.hpp index b26a6d862..e8426c2cb 100644 --- a/include/libtorrent/peer_list.hpp +++ b/include/libtorrent/peer_list.hpp @@ -183,6 +183,10 @@ namespace libtorrent std::pair find_peers(address const& a) { +#if TORRENT_USE_I2P + if (a == address()) + return std::pair(m_peers.end(), m_peers.end()); +#endif return std::equal_range( m_peers.begin(), m_peers.end(), a, peer_address_compare()); }