Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
kaijchen committed Sep 2, 2024
1 parent c8f9c1d commit d395606
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions be/src/util/proto_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ Status transmit_block_httpv2(ExecEnv* exec_env, std::unique_ptr<Closure> closure
TNetworkAddress brpc_dest_addr) {
RETURN_IF_ERROR(request_embed_attachment_contain_blockv2(closure->request_.get(), closure));

std::string host = brpc_dest_addr.host;
if (!is_valid_ip(brpc_dest_addr.host)) {
Status status = ExecEnv::GetInstance()->dns_cache()->get(brpc_dest_addr.host, &host);
std::string host = brpc_dest_addr.hostname;
if (!is_valid_ip(brpc_dest_addr.hostname)) {
Status status = ExecEnv::GetInstance()->dns_cache()->get(brpc_dest_addr.hostname, &host);
if (!status.ok()) {
LOG(WARNING) << "failed to get ip from host " << brpc_dest_addr.host << ": "
LOG(WARNING) << "failed to get ip from host " << brpc_dest_addr.hostname << ": "
<< status.to_string();
return Status::InternalError("failed to get ip from host {}", brpc_dest_addr.host);
return Status::InternalError("failed to get ip from host {}", brpc_dest_addr.hostname);
}
}
//format an ipv6 address
Expand Down

0 comments on commit d395606

Please sign in to comment.