diff options
| author | Nayd <dnpd.dd@gmail.com> | 2014-11-16 20:08:28 +0000 |
|---|---|---|
| committer | Nayd <dnpd.dd@gmail.com> | 2014-11-16 20:10:23 +0000 |
| commit | 1119558b9e4e525af05875867afa864df5e808ee (patch) | |
| tree | 16a727c523063294934064b053070c419c675a4f | |
| parent | 1699cf70dd0e33f3e7ea2aedec6270878109ace9 (diff) | |
Core/Networking: Catch possible boost exception in StartNetwork
Closes #13557
(cherry picked from commit 3eb120ab507aa65e452d21a63ff500254129c262)
| -rw-r--r-- | src/server/shared/Networking/SocketMgr.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/shared/Networking/SocketMgr.h b/src/server/shared/Networking/SocketMgr.h index dbe2b8ec902..a62fe973dfa 100644 --- a/src/server/shared/Networking/SocketMgr.h +++ b/src/server/shared/Networking/SocketMgr.h @@ -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); |
