From d49dde7c5eb1ed7bd937f841a9f73be161da6f21 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 17 May 2019 13:35:42 +0300 Subject: [PATCH] #510 - move m_Acceptor.reset under try --- libi2pd_client/I2PService.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libi2pd_client/I2PService.cpp b/libi2pd_client/I2PService.cpp index c795fc5f..43d75e3a 100644 --- a/libi2pd_client/I2PService.cpp +++ b/libi2pd_client/I2PService.cpp @@ -282,10 +282,10 @@ namespace client void TCPIPAcceptor::Start () { - m_Acceptor.reset (new boost::asio::ip::tcp::acceptor (GetService (), m_LocalEndpoint)); - // update the local end point in case port has been set zero and got updated now - m_LocalEndpoint = m_Acceptor->local_endpoint(); try { + m_Acceptor.reset (new boost::asio::ip::tcp::acceptor (GetService (), m_LocalEndpoint)); + // update the local end point in case port has been set zero and got updated now + m_LocalEndpoint = m_Acceptor->local_endpoint(); m_Acceptor->listen (); Accept (); } catch (std::exception& ex) {