Browse Source

Limit DNS resolution to ipv4.

cl-refactor
subtly 10 years ago
parent
commit
88193ae7c8
  1. 2
      libp2p/Network.cpp

2
libp2p/Network.cpp

@ -226,7 +226,7 @@ bi::tcp::endpoint Network::resolveHost(string const& _addr)
boost::system::error_code ec; boost::system::error_code ec;
// resolve returns an iterator (host can resolve to multiple addresses) // resolve returns an iterator (host can resolve to multiple addresses)
bi::tcp::resolver r(s_resolverIoService); bi::tcp::resolver r(s_resolverIoService);
auto it = r.resolve({split[0], toString(port)}, ec); auto it = r.resolve({bi::tcp::v4(), split[0], toString(port)}, ec);
if (ec) if (ec)
clog(NetWarn) << "Error resolving host address..." << LogTag::Url << _addr << ":" << LogTag::Error << ec.message(); clog(NetWarn) << "Error resolving host address..." << LogTag::Url << _addr << ":" << LogTag::Error << ec.message();
else else

Loading…
Cancel
Save