Fix errors in build check

This commit is contained in:
DF5HSE 2022-01-27 13:44:39 +03:00
parent 3343a22788
commit 3cb433762b
2 changed files with 3 additions and 3 deletions

View File

@ -482,9 +482,9 @@ catch (...)
void Client::connect()
{
for (size_t attempted_address_index = 0; attempted_address_index < hosts_ports.size(); ++attempted_address_index)
for (auto host_port : hosts_ports)
{
DB::DNSResolver::instance().resolveHost(hosts_ports[attempted_address_index].host);
DB::DNSResolver::instance().resolveHost(host_port.host);
}
UInt16 default_port = ConnectionParameters::getPortFromConfig(config());
connection_parameters = ConnectionParameters(config(), hosts_ports[0].host,

View File

@ -69,8 +69,8 @@ ConnectionParameters::ConnectionParameters(const Poco::Util::AbstractConfigurati
}
ConnectionParameters::ConnectionParameters(const Poco::Util::AbstractConfiguration & config)
: ConnectionParameters(config, config.getString("host", "localhost"), getPortFromConfig(config))
{
ConnectionParameters(config, config.getString("host", "localhost"), getPortFromConfig(config));
}
int ConnectionParameters::getPortFromConfig(const Poco::Util::AbstractConfiguration & config)