made policy::has_connection not throw

This commit is contained in:
Arvid Norberg 2007-08-21 19:04:27 +00:00
parent b121386492
commit 847f96d9c3
1 changed files with 2 additions and 1 deletions

View File

@ -1373,7 +1373,8 @@ namespace libtorrent
INVARIANT_CHECK;
assert(c);
assert(c->remote() == c->get_socket()->remote_endpoint());
try { assert(c->remote() == c->get_socket()->remote_endpoint()); }
catch (std::exception&) {}
return std::find_if(
m_peers.begin()