diff --git a/plugins/http_plugin/include/eosio/http_plugin/beast_http_listener.hpp b/plugins/http_plugin/include/eosio/http_plugin/beast_http_listener.hpp index 8a0e878954..9cadbffcd7 100644 --- a/plugins/http_plugin/include/eosio/http_plugin/beast_http_listener.hpp +++ b/plugins/http_plugin/include/eosio/http_plugin/beast_http_listener.hpp @@ -110,7 +110,9 @@ class beast_http_listener : public std::enable_shared_from_thisplugin_state_->logger, "closing connection"); } else { // Create the session object and run it - std::string remote_endpoint = boost::lexical_cast(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(re); std::make_shared( std::move(self->socket_), self->plugin_state_,