We must always post a recv initial metadata (#29145)

* We must always post a recv initial metadata

* remove spurious change
pull/29212/head
Craig Tiller 3 years ago committed by GitHub
parent f4126cdfbb
commit 1dff2dc660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      include/grpcpp/impl/codegen/sync_stream.h

@ -222,7 +222,12 @@ class ClientReader final : public ClientReaderInterface<R> {
/// The \a ClientContext associated with this call is updated with
/// possible metadata received from the server.
grpc::Status Finish() override {
grpc::internal::CallOpSet<grpc::internal::CallOpClientRecvStatus> ops;
grpc::internal::CallOpSet<grpc::internal::CallOpRecvInitialMetadata,
grpc::internal::CallOpClientRecvStatus>
ops;
if (!context_->initial_metadata_received_) {
ops.RecvInitialMetadata(context_);
}
grpc::Status status;
ops.ClientRecvStatus(context_, &status);
call_.PerformOps(&ops);

Loading…
Cancel
Save