Skip to content

Commit

Permalink
make sure to always receive initial metadata in ruby (grpc#29155)
Browse files Browse the repository at this point in the history
  • Loading branch information
apolcyn authored Mar 19, 2022
1 parent 364de4a commit fe13456
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ruby/lib/grpc/generic/active_call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,13 @@ def interceptable
end

def receive_and_check_status
batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil)
ops = { RECV_STATUS_ON_CLIENT => nil }
ops[RECV_INITIAL_METADATA] = nil unless @metadata_received
batch_result = @call.run_batch(ops)
unless @metadata_received
@call.metadata = batch_result.metadata
@metadata_received = true
end
set_input_stream_done
attach_status_results_and_complete_call(batch_result)
end
Expand Down

0 comments on commit fe13456

Please sign in to comment.