From 4fd2bf6ec964dae973040984e5b5b387fe2f72e1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 3 Feb 2017 10:47:59 -0800 Subject: Dont credit flow control after stream has closed reading --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 272f5fcf8c..fb5ae575db 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2037,7 +2037,7 @@ static void incoming_byte_stream_update_flow_control(grpc_exec_ctx *exec_ctx, /* add some small lookahead to keep pipelines flowing */ GPR_ASSERT(max_recv_bytes <= UINT32_MAX - initial_window_size); - if (s->incoming_window_delta < max_recv_bytes) { + if (s->incoming_window_delta < max_recv_bytes && !s->read_closed) { uint32_t add_max_recv_bytes = (uint32_t)(max_recv_bytes - s->incoming_window_delta); grpc_chttp2_stream_write_type write_type = -- cgit v1.2.3