Guarantee that Z_FINISH is only applied at the end of stream

pull/12244/head
Muxi Yan 7 years ago
parent c353643c37
commit 76e0c1ddd5
  1. 3
      src/core/ext/transport/chttp2/transport/writing.c

@ -322,7 +322,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
(send_bytes == s->compressed_data_buffer->length &&
s->flow_controlled_buffer.length == 0 &&
s->fetching_send_message == NULL);
if (is_last_data_frame && s->stream_compression_ctx != NULL) {
if (is_last_data_frame && s->send_trailing_metadata != NULL &&
s->stream_compression_ctx != NULL) {
if (!grpc_stream_compress(
s->stream_compression_ctx, &s->flow_controlled_buffer,
s->compressed_data_buffer, NULL, MAX_SIZE_T,

Loading…
Cancel
Save