diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-06-19 21:14:11 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-06-19 21:14:11 +0200 |
commit | e97d96ccfbb639f621cc4f4336c54cc02fa43485 (patch) | |
tree | 1344845a0ec97302fb9b9b723d4a18e6536570ec /src/p2p | |
parent | Merge pull request #854 (diff) | |
parent | Print stack trace on exceptions (diff) | |
download | monero-e97d96ccfbb639f621cc4f4336c54cc02fa43485.tar.xz |
Merge pull request #775
e409e59 Print stack trace on exceptions (moneromooo-monero)
ef4ff42 connection_basic: avoid gratuitous exception (moneromooo-monero)
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/connection_basic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/connection_basic.cpp b/src/p2p/connection_basic.cpp index c0b73bc3e..df702134e 100644 --- a/src/p2p/connection_basic.cpp +++ b/src/p2p/connection_basic.cpp @@ -161,7 +161,7 @@ connection_basic::connection_basic(boost::asio::io_service& io_service, std::ato mI->m_peer_number = sock_number.fetch_add(1); // use, and increase the generated number string remote_addr_str = "?"; - try { remote_addr_str = socket_.remote_endpoint().address().to_string(); } catch(...){} ; + try { boost::system::error_code e; remote_addr_str = socket_.remote_endpoint(e).address().to_string(); } catch(...){} ; _note("Spawned connection p2p#"<<mI->m_peer_number<<" to " << remote_addr_str << " currently we have sockets count:" << m_ref_sock_count); //boost::filesystem::create_directories("log/dr-monero/net/"); @@ -170,7 +170,7 @@ connection_basic::connection_basic(boost::asio::io_service& io_service, std::ato connection_basic::~connection_basic() { string remote_addr_str = "?"; m_ref_sock_count--; - try { remote_addr_str = socket_.remote_endpoint().address().to_string(); } catch(...){} ; + try { boost::system::error_code e; remote_addr_str = socket_.remote_endpoint(e).address().to_string(); } catch(...){} ; _note("Destructing connection p2p#"<<mI->m_peer_number << " to " << remote_addr_str); } |