From f6c15e09dece3b1871401f18bc3aa424bcb5036e Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sat, 8 Sep 2007 18:57:50 +0000 Subject: [PATCH] session_impl fix --- libtorrent/src/session_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 596ffc4b2..7cfb6953a 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -1238,7 +1238,8 @@ namespace detail if (num_connections() >= max_connections() && !m_torrents.empty()) { torrent_map::iterator i = std::max_element(m_torrents.begin(), m_torrents.end() - , bind(&torrent::num_peers, bind(&torrent_map::value_type::second, _1))); + , bind(&torrent::num_peers, bind(&torrent_map::value_type::second, _1)) + < bind(&torrent::num_peers, bind(&torrent_map::value_type::second, _2))); assert(i != m_torrents.end()); i->second->get_policy().disconnect_one_peer();