diff --git a/CHANGELOG.md b/CHANGELOG.md index e9042525..c2dc86bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ Version XXX: +* Fix accept error handling in http_server_async example. * Move library-specific docca configuration to Beast. * Remove dependency on RTTI in `test::stream`. diff --git a/example/http/server/async-ssl/http_server_async_ssl.cpp b/example/http/server/async-ssl/http_server_async_ssl.cpp index f6c66c90..36cfc10c 100644 --- a/example/http/server/async-ssl/http_server_async_ssl.cpp +++ b/example/http/server/async-ssl/http_server_async_ssl.cpp @@ -500,6 +500,7 @@ private: if(ec) { fail(ec, "accept"); + return; // To avoid infinite loop } else { diff --git a/example/http/server/async/http_server_async.cpp b/example/http/server/async/http_server_async.cpp index 55fd234b..bc232c74 100644 --- a/example/http/server/async/http_server_async.cpp +++ b/example/http/server/async/http_server_async.cpp @@ -434,6 +434,7 @@ private: if(ec) { fail(ec, "accept"); + return; // To avoid infinite loop } else {