mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
#510 - move m_Acceptor.reset under try
This commit is contained in:
parent
754299339d
commit
d49dde7c5e
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue