Skip to content

Commit

Permalink
Merge pull request #2211 from AntelopeIO/max-requests_fix
Browse files Browse the repository at this point in the history
[5.0 -> main] fix crash/UB when exceeding `http-max-requests-in-flight`
  • Loading branch information
spoonincode authored Feb 5, 2024
2 parents 37cf729 + 861519d commit 29f90ff
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 29f90ff

Please sign in to comment.