diff options
author | yangg <yangg@google.com> | 2014-12-17 16:48:06 -0800 |
---|---|---|
committer | Michael Lumish <mlumish@google.com> | 2014-12-19 13:07:20 -0800 |
commit | 246ec3bd3a386a7ccf8516425214b7ac368436a9 (patch) | |
tree | 4e8f8e9b89c4ca7e32c01f1f622223619b3b1a2c | |
parent | fd2f3ac91d6992305522ca3729b6dd527a299e8f (diff) |
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
-rw-r--r-- | src/cpp/client/channel.cc | 6 | ||||
-rw-r--r-- | test/cpp/end2end/async_test_server.cc | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index 115e454943..febad62218 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.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); diff --git a/test/cpp/end2end/async_test_server.cc b/test/cpp/end2end/async_test_server.cc index 0a40dbbbd9..f18b6c00bc 100644 --- a/test/cpp/end2end/async_test_server.cc +++ b/test/cpp/end2end/async_test_server.cc @@ -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. |