aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2019-01-07 09:23:35 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2019-01-07 09:23:35 -0800
commit7d1491d64c9b6279233c780d290c514a7040c1c7 (patch)
treef45bc85349898f4b89cdba88b928016f408d1ed7 /include
parent2b4781ca526b0823fbea263a5c7b07fdf8abe41d (diff)
Address reviewer comments
Diffstat (limited to 'include')
-rw-r--r--include/grpcpp/impl/codegen/call_op_set.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/grpcpp/impl/codegen/call_op_set.h b/include/grpcpp/impl/codegen/call_op_set.h
index e8a4d389f1..ced0b2ff3e 100644
--- a/include/grpcpp/impl/codegen/call_op_set.h
+++ b/include/grpcpp/impl/codegen/call_op_set.h
@@ -321,6 +321,7 @@ class CallOpSendMessage {
if (msg_ != nullptr) {
GPR_CODEGEN_ASSERT(serializer_(msg_).ok());
}
+ serializer_ = nullptr;
grpc_op* op = &ops[(*nops)++];
op->op = GRPC_OP_SEND_MESSAGE;
op->flags = write_options_.flags();
@@ -361,13 +362,13 @@ class CallOpSendMessage {
template <class M>
Status CallOpSendMessage::SendMessage(const M& message, WriteOptions options) {
write_options_ = options;
- // TODO(vjpai): Remove the void below when possible
- // The void in the template parameter below should not be needed
- // (since it should be implicit) but is needed due to an observed
- // difference in behavior between clang and gcc for certain internal users
serializer_ = [this](const void* message) {
bool own_buf;
send_buf_.Clear();
+ // TODO(vjpai): Remove the void below when possible
+ // The void in the template parameter below should not be needed
+ // (since it should be implicit) but is needed due to an observed
+ // difference in behavior between clang and gcc for certain internal users
Status result = SerializationTraits<M, void>::Serialize(
*static_cast<const M*>(message), send_buf_.bbuf_ptr(), &own_buf);
if (!own_buf) {