Skip to content

Commit 468296b

Browse files
authored
Merge pull request grpc#22817 from markdroth/absl_string_view_host_port_fix
Fix c-ares resolver to properly handle error from SplitHostPort().
2 parents d86acba + ffd7b27 commit 468296b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,7 @@ static bool inner_resolve_as_ip_literal_locked(
467467
const char* name, const char* default_port,
468468
std::unique_ptr<grpc_core::ServerAddressList>* addrs, std::string* host,
469469
std::string* port, std::string* hostport) {
470-
grpc_core::SplitHostPort(name, host, port);
471-
if (host->empty()) {
470+
if (!grpc_core::SplitHostPort(name, host, port)) {
472471
gpr_log(GPR_ERROR,
473472
"Failed to parse %s to host:port while attempting to resolve as ip "
474473
"literal.",

0 commit comments

Comments
 (0)