Skip to content

Commit

Permalink
Merge pull request #1177 from AntelopeIO/GH-1149-http-shutdown-main
Browse files Browse the repository at this point in the history
[4.0 -> main] Ignore http error on remote_endpoint() causing shutdown
  • Loading branch information
heifner authored May 16, 2023
2 parents 203309b + dd801e3 commit 7a2285d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class beast_http_listener : public std::enable_shared_from_this<beast_http_liste
fail(ec, "accept", self->plugin_state_->logger, "closing connection");
} else {
// Create the session object and run it
std::string remote_endpoint = boost::lexical_cast<std::string>(self->socket_.remote_endpoint());
boost::system::error_code re_ec;
auto re = self->socket_.remote_endpoint(re_ec);
std::string remote_endpoint = re_ec ? "unknown" : boost::lexical_cast<std::string>(re);
std::make_shared<beast_http_session<socket_type>>(
std::move(self->socket_),
self->plugin_state_,
Expand Down

0 comments on commit 7a2285d

Please sign in to comment.