aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-07-06 14:18:14 -0700
committerGravatar Vijay Pai <vpai@google.com>2018-07-06 14:21:14 -0700
commitc5336fcf8b8fa1b8f69131c2eca21edca30474b4 (patch)
tree49ee7ee5f10ddb762d26b7bc0bd402160dc4ba7e /include/grpcpp
parent252d3f3b460cf56db2e30d68e566a00cef0304eb (diff)
Drop a spurious assert, since ServerReader can SendInitialMetadata
Diffstat (limited to 'include/grpcpp')
-rw-r--r--include/grpcpp/impl/codegen/method_handler_impl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/grpcpp/impl/codegen/method_handler_impl.h b/include/grpcpp/impl/codegen/method_handler_impl.h
index 27552d79df..851aa2a024 100644
--- a/include/grpcpp/impl/codegen/method_handler_impl.h
+++ b/include/grpcpp/impl/codegen/method_handler_impl.h
@@ -113,14 +113,15 @@ class ClientStreamingHandler : public MethodHandler {
return func_(service_, param.server_context, &reader, &rsp);
});
- GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage,
CallOpServerSendStatus>
ops;
- ops.SendInitialMetadata(param.server_context->initial_metadata_,
- param.server_context->initial_metadata_flags());
- if (param.server_context->compression_level_set()) {
- ops.set_compression_level(param.server_context->compression_level());
+ if (!param.server_context->sent_initial_metadata_) {
+ ops.SendInitialMetadata(param.server_context->initial_metadata_,
+ param.server_context->initial_metadata_flags());
+ if (param.server_context->compression_level_set()) {
+ ops.set_compression_level(param.server_context->compression_level());
+ }
}
if (status.ok()) {
status = ops.SendMessage(rsp);