aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-08-31 14:59:17 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-08-31 14:59:17 -0700
commit76e0c1ddd536342bdc5059209da38d5406c7e717 (patch)
tree5b53f543adca6295b4d4b5d0cb6a18251aa8795d /src
parentc353643c378cecf96a580eee901a8be3308e18b9 (diff)
Guarantee that Z_FINISH is only applied at the end of stream
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c
index b6bf0450ee..410c154206 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/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,