From 2f4506dc3725f15cfdc64c395efbd013a295457b Mon Sep 17 00:00:00 2001 From: Hreniuc Cristian-Alexandru Date: Tue, 28 Sep 2021 12:49:42 +0300 Subject: [PATCH] Fix accept error handling in http_server_async example close #2319 --- CHANGELOG.md | 1 + example/http/server/async-ssl/http_server_async_ssl.cpp | 1 + example/http/server/async/http_server_async.cpp | 1 + 3 files changed, 3 insertions(+) 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 {