Skip to content

Commit

Permalink
Merge pull request #1665 from AntelopeIO/GH-1661-conn-reset-main
Browse files Browse the repository at this point in the history
[4.0 -> main] HTTP: Check for connection_reset
  • Loading branch information
heifner authored Sep 21, 2023
2 parents 01b128e + 0429796 commit 6a4d3e3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,10 @@ class beast_http_session : public detail::abstract_conn,

void on_read_header(beast::error_code ec, std::size_t /* bytes_transferred */) {
if(ec) {
if(ec == http::error::end_of_stream) // other side closed the connection
// See on_read comment below
if(ec == http::error::end_of_stream || ec == asio::error::connection_reset)
return do_eof();

return fail(ec, "read_header", plugin_state_.get_logger(), "closing connection");
}

Expand Down

0 comments on commit 6a4d3e3

Please sign in to comment.