diff options
Diffstat (limited to 'src/cpp/server/server_context.cc')
-rw-r--r-- | src/cpp/server/server_context.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index acc163d6b5..8193e70660 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -136,10 +136,9 @@ ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata* metadata, cq_(nullptr), sent_initial_metadata_(false) { for (size_t i = 0; i < metadata_count; i++) { - client_metadata_.insert(std::make_pair( - grpc::string(metadata[i].key), - grpc::string(metadata[i].value, - metadata[i].value + metadata[i].value_length))); + client_metadata_.insert(std::pair<grpc::string_ref, grpc::string_ref>( + metadata[i].key, + grpc::string_ref(metadata[i].value, metadata[i].value_length))); } } |