Skip to content

Commit

Permalink
GH-1418 Ignore error of remote_endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jul 26, 2023
1 parent 00b045c commit 7ec90bf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,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<session_type>(
std::move(self->socket_),
self->plugin_state_,
Expand Down

0 comments on commit 7ec90bf

Please sign in to comment.