diff options
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | zenhttp/httpasio.cpp | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index bca582768..985248c77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Bugfix: Safely handle missing blocks when doing garbage collection in block store data - Bugfix: Only strip uri accept type suffix if it can be parsed to a known type - Bugfix: Keep system error code on Windows when file mapping fails and propagate to log/exception +- Bugfix: Catch any errors throw in HttpAsioServer() destructor and log error. ## 0.2.6 - Strip __FILE__ macro names in logging to only include the file name as to not expose file paths of the machine building the executable diff --git a/zenhttp/httpasio.cpp b/zenhttp/httpasio.cpp index 510b349f9..79b2c0a3d 100644 --- a/zenhttp/httpasio.cpp +++ b/zenhttp/httpasio.cpp @@ -1296,7 +1296,14 @@ HttpAsioServer::HttpAsioServer() : m_Impl(std::make_unique<asio_http::HttpAsioSe HttpAsioServer::~HttpAsioServer() { - m_Impl->Stop(); + try + { + m_Impl->Stop(); + } + catch (std::exception& ex) + { + ZEN_WARN("Caught exception stopping http asio server: {}", ex.what()); + } } void |