diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index d149987fa24f940075f0d3873fb87fc9c8b19e76..b5e37fd12b10df788886e1d250073229f2774e7a 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -273,8 +273,6 @@ class ServerContext { uint32_t initial_metadata_flags() const { return 0; } - CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> pending_ops_; - bool has_pending_ops_; CompletionOp* completion_op_; bool has_notify_when_done_tag_; void* async_notify_when_done_tag_; @@ -291,6 +289,9 @@ class ServerContext { bool compression_level_set_; grpc_compression_level compression_level_; grpc_compression_algorithm compression_algorithm_; + + CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> pending_ops_; + bool has_pending_ops_; }; } // namespace grpc diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 3a6bca13b345d5c59f9d40d51aa4670fc79a475a..4913682f1d16ce886bbe15112d8f4db4dc4fdae6 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -120,7 +120,8 @@ ServerContext::ServerContext() call_(nullptr), cq_(nullptr), sent_initial_metadata_(false), - compression_level_set_(false) {} + compression_level_set_(false), + has_pending_ops_(false) {} ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata_array* arr) : completion_op_(nullptr), @@ -130,7 +131,8 @@ ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata_array* arr) call_(nullptr), cq_(nullptr), sent_initial_metadata_(false), - compression_level_set_(false) { + compression_level_set_(false), + has_pending_ops_(false) { std::swap(*client_metadata_.arr(), *arr); client_metadata_.FillMap(); }