Fixed error [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2018-01-11 21:55:31 +03:00
parent b026eb7797
commit 73460a5f86
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ std::pair<std::string, UInt16> parseAddress(const std::string & str, UInt16 defa
if (port != end)
{
UInt16 port_number = parse<UInt16>(port);
UInt16 port_number = parse<UInt16>(port + 1);
return { std::string(begin, port), port_number };
}
else if (default_port)

View File

@ -75,8 +75,8 @@ Cluster::Address::Address(const String & host_port_, const String & user_, const
auto parsed_host_port = parseAddress(host_port_, clickhouse_port);
resolved_address = resolveSocketAddress(parsed_host_port.first, parsed_host_port.second);
host_name = host_port_;
port = clickhouse_port;
host_name = parsed_host_port.first;
port = parsed_host_port.second;
is_local = isLocal(*this, clickhouse_port);
}