From 5efe12dde6fafb4d4cec4b55396ca3ccd2ca8dd0 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 13 Jun 2007 18:28:55 +0000 Subject: [PATCH] fixed bug reported by Marcos Pinto where an exception was not cought properly --- src/session_impl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 022e4f184..1a744ab44 100755 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -601,7 +601,9 @@ namespace detail for (session_impl::connection_map::iterator i = m_connections.begin(); i != m_connections.end();) { - tcp::endpoint sender = i->first->remote_endpoint(); + tcp::endpoint sender; + try { sender = i->first->remote_endpoint(); } + catch (std::exception&) { sender = i->second->remote(); } if (m_ip_filter.access(sender.address()) & ip_filter::blocked) { #if defined(TORRENT_VERBOSE_LOGGING)