Set host to channel's target when creating a call.

Change on 2014/12/17 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82377896
pull/1/merge
yangg 10 years ago committed by Michael Lumish
parent fd2f3ac91d
commit 246ec3bd3a
  1. 6
      src/cpp/client/channel.cc
  2. 1
      test/cpp/end2end/async_test_server.cc

@ -78,10 +78,8 @@ Status Channel::StartBlockingRpc(const RpcMethod& method,
const google::protobuf::Message& request,
google::protobuf::Message* result) {
Status status;
grpc_call* call =
grpc_channel_create_call(c_channel_, method.name(),
// FIXME(yangg)
"localhost", context->RawDeadline());
grpc_call* call = grpc_channel_create_call(
c_channel_, method.name(), target_.c_str(), context->RawDeadline());
context->set_call(call);
grpc_event* ev;
void* finished_tag = reinterpret_cast<char*>(call);

@ -90,7 +90,6 @@ void AsyncTestServer::MainLoop() {
gpr_log(GPR_INFO, "SERVER_RPC_NEW %p", server_context);
if (server_context) {
EXPECT_EQ(server_context->method(), "/foo");
EXPECT_EQ(server_context->host(), "localhost");
// TODO(ctiller): verify deadline
server_context->Accept(cq_.cq());
// Handle only one rpc at a time.

Loading…
Cancel
Save