From 68987416adb755337714964b38db3ada08ec2203 Mon Sep 17 00:00:00 2001 From: redfish Date: Wed, 18 May 2016 00:57:17 -0400 Subject: src: p2p: add exception spec to throwing destructors The destructors get a noexcept(true) spec by default, but these destructors in fact throw exceptions. An alternative fix might be to not throw (most if not all of these throws are non-essential error-reporting/logging). --- src/p2p/connection_basic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/p2p/connection_basic.cpp') diff --git a/src/p2p/connection_basic.cpp b/src/p2p/connection_basic.cpp index c0b73bc3e..22c5ef772 100644 --- a/src/p2p/connection_basic.cpp +++ b/src/p2p/connection_basic.cpp @@ -167,7 +167,7 @@ connection_basic::connection_basic(boost::asio::io_service& io_service, std::ato //boost::filesystem::create_directories("log/dr-monero/net/"); } -connection_basic::~connection_basic() { +connection_basic::~connection_basic() noexcept(false) { string remote_addr_str = "?"; m_ref_sock_count--; try { remote_addr_str = socket_.remote_endpoint().address().to_string(); } catch(...){} ; -- cgit v1.2.3