Core/Networking: Catch possible boost exception in StartNetwork

Closes #13557

(cherry picked from commit 3eb120ab50)
This commit is contained in:
Nayd
2014-11-16 20:08:28 +00:00
parent 1699cf70dd
commit 1119558b9e

View File

@@ -46,7 +46,16 @@ public:
return false;
}
_acceptor = new AsyncAcceptor(service, bindIp, port);
try
{
_acceptor = new AsyncAcceptor(service, bindIp, port);
}
catch (boost::system::system_error const& err)
{
TC_LOG_ERROR("network", "Exception caught in SocketMgr.StartNetwork (%s:%u): %s", bindIp.c_str(), port, err.what());
return false;
}
_threads = CreateThreads();
ASSERT(_threads);