Initialize pending_ops false

pull/11557/head
Noah Eisen 8 years ago
parent 36bb8a0006
commit 67a40548ca
  1. 5
      include/grpc++/impl/codegen/server_context.h
  2. 6
      src/cpp/server/server_context.cc

@ -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

@ -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();
}

Loading…
Cancel
Save