diff options
Diffstat (limited to 'test/cpp/interop/http2_client.cc')
-rw-r--r-- | test/cpp/interop/http2_client.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/cpp/interop/http2_client.cc b/test/cpp/interop/http2_client.cc index 543f159265..bc7f0f5edb 100644 --- a/test/cpp/interop/http2_client.cc +++ b/test/cpp/interop/http2_client.cc @@ -42,16 +42,16 @@ const int kLargeRequestSize = 271828; const int kLargeResponseSize = 314159; } // namespace -Http2Client::ServiceStub::ServiceStub(std::shared_ptr<Channel> channel) - : channel_(channel) { +Http2Client::ServiceStub::ServiceStub(const std::shared_ptr<Channel>& channel) + : channel_(std::move(channel)) { stub_ = TestService::NewStub(channel); } TestService::Stub* Http2Client::ServiceStub::Get() { return stub_.get(); } -Http2Client::Http2Client(std::shared_ptr<Channel> channel) +Http2Client::Http2Client(const std::shared_ptr<Channel>& channel) : serviceStub_(channel), - channel_(channel), + channel_(std::move(channel)), defaultRequest_(BuildDefaultRequest()) {} bool Http2Client::AssertStatusCode(const Status& s, StatusCode expected_code) { @@ -140,7 +140,8 @@ bool Http2Client::DoPing() { return true; } -void Http2Client::MaxStreamsWorker(std::shared_ptr<grpc::Channel> channel) { +void Http2Client::MaxStreamsWorker( + const std::shared_ptr<grpc::Channel>& channel) { SimpleResponse response; AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == |