Don't attempt to find_peers in peer_list for i2p

This closes #7
This commit is contained in:
Mikhail Titov 2015-06-20 20:03:35 -05:00
parent 77ca1ac16f
commit 3d448402a4
1 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,10 @@ namespace libtorrent
std::pair<iterator, iterator> find_peers(address const& a)
{
#if TORRENT_USE_I2P
if (a == address())
return std::pair<iterator, iterator>(m_peers.end(), m_peers.end());
#endif
return std::equal_range(
m_peers.begin(), m_peers.end(), a, peer_address_compare());
}