diff --git a/ChangeLog b/ChangeLog index 2e10a7739..50f7a1b6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -89,6 +89,9 @@ * resume data no longer has timestamps of files * require C++11 to build libtorrent +1.1.10 release + + * fix issue in udp_socket with unusual socket failure * split progress_notification alert category into file-, piece- and block progress * utp close-reason fix * exposed default add_torrent_params flags to python bindings diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 87cef88c9..1c9590d6f 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1854,6 +1854,10 @@ namespace aux { // an existing socket for (auto const& ep : eps) { +#ifndef BOOST_NO_EXCEPTIONS + try +#endif + { std::shared_ptr s = setup_listener(ep, ec); if (!ec && (s->sock || s->udp_sock)) @@ -1869,6 +1873,21 @@ namespace aux { if (s->sock) async_accept(s->sock, s->ssl); } } +#ifndef BOOST_NO_EXCEPTIONS + catch (std::exception const& e) + { +#ifndef TORRENT_DISABLE_LOGGING + if (should_log()) + { + session_log("setup_listener(%s) device: %s failed: %s" + , print_endpoint(ep.addr, ep.port).c_str() + , ep.device.c_str() + , e.what()); + } +#endif // TORRENT_DISABLE_LOGGING + } +#endif // BOOST_NO_EXCEPTIONS + } if (m_listen_sockets.empty()) {