Skip to content

Commit

Permalink
Merge pull request #489 from eosnetworkfoundation/boost_deprecated_qu…
Browse files Browse the repository at this point in the history
…ery_object

Eliminate use of boost deprecated query object.
  • Loading branch information
ClaytonCalabrese authored Jun 22, 2022
2 parents 1a001af + 66bfda2 commit 23fd8a8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugins/http_plugin/http_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,8 @@ class http_plugin_impl : public std::enable_shared_from_this<http_plugin_impl> {
string lipstr = options.at( "http-server-address" ).as<string>();
string host = lipstr.substr( 0, lipstr.find( ':' ));
string port = lipstr.substr( host.size() + 1, lipstr.size());
tcp::resolver::query query( tcp::v4(), host.c_str(), port.c_str());
try {
my->listen_endpoint = *resolver.resolve( query );
my->listen_endpoint = *resolver.resolve( tcp::v4(), host, port );
ilog( "configured http to listen on ${h}:${p}", ("h", host)( "p", port ));
} catch ( const boost::system::system_error& ec ) {
elog( "failed to configure http to listen on ${h}:${p} (${m})",
Expand Down Expand Up @@ -772,9 +771,8 @@ class http_plugin_impl : public std::enable_shared_from_this<http_plugin_impl> {
string lipstr = options.at( "https-server-address" ).as<string>();
string host = lipstr.substr( 0, lipstr.find( ':' ));
string port = lipstr.substr( host.size() + 1, lipstr.size());
tcp::resolver::query query( tcp::v4(), host.c_str(), port.c_str());
try {
my->https_listen_endpoint = *resolver.resolve( query );
my->https_listen_endpoint = *resolver.resolve( tcp::v4(), host, port );
ilog( "configured https to listen on ${h}:${p} (TLS configuration will be validated momentarily)",
("h", host)( "p", port ));
my->https_cert_chain = options.at( "https-certificate-chain-file" ).as<string>();
Expand Down

0 comments on commit 23fd8a8

Please sign in to comment.