From 874b80ea2d19a09d8017a51232e057d1bc4ec3fe Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:39:44 -0500 Subject: [PATCH] fix crash/UB when exceeding max-requests-in-flight --- .../include/eosio/http_plugin/beast_http_session.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/http_plugin/include/eosio/http_plugin/beast_http_session.hpp b/plugins/http_plugin/include/eosio/http_plugin/beast_http_session.hpp index dac0468216..4586410525 100644 --- a/plugins/http_plugin/include/eosio/http_plugin/beast_http_session.hpp +++ b/plugins/http_plugin/include/eosio/http_plugin/beast_http_session.hpp @@ -492,8 +492,9 @@ class beast_http_session : public detail::abstract_conn, void run_session() { if(auto error_str = verify_max_requests_in_flight(); !error_str.empty()) { + res_->keep_alive(false); send_busy_response(std::move(error_str)); - return do_eof(); + return; } do_read_header();