aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/server/server_rpc_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/server/server_rpc_handler.cc')
-rw-r--r--src/cpp/server/server_rpc_handler.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cpp/server/server_rpc_handler.cc b/src/cpp/server/server_rpc_handler.cc
index b7b29c2406..42f8b755b6 100644
--- a/src/cpp/server/server_rpc_handler.cc
+++ b/src/cpp/server/server_rpc_handler.cc
@@ -60,8 +60,10 @@ void ServerRpcHandler::StartRpc() {
async_server_context_->Accept(cq_.cq());
// Allocate request and response.
- std::unique_ptr<google::protobuf::Message> request(method_->AllocateRequestProto());
- std::unique_ptr<google::protobuf::Message> response(method_->AllocateResponseProto());
+ std::unique_ptr<google::protobuf::Message> request(
+ method_->AllocateRequestProto());
+ std::unique_ptr<google::protobuf::Message> response(
+ method_->AllocateResponseProto());
// Read request
async_server_context_->StartRead(request.get());
@@ -86,8 +88,10 @@ void ServerRpcHandler::StartRpc() {
} else {
// Allocate request and response.
// TODO(yangg) maybe not allocate both when not needed?
- std::unique_ptr<google::protobuf::Message> request(method_->AllocateRequestProto());
- std::unique_ptr<google::protobuf::Message> response(method_->AllocateResponseProto());
+ std::unique_ptr<google::protobuf::Message> request(
+ method_->AllocateRequestProto());
+ std::unique_ptr<google::protobuf::Message> response(
+ method_->AllocateResponseProto());
StreamContext stream_context(*method_, async_server_context_->call(),
cq_.cq(), request.get(), response.get());