aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2016-02-22 10:00:20 -0800
committerGravatar yang-g <yangg@google.com>2016-02-22 10:00:20 -0800
commitad0df7bf1fa9a2ad6302016cfbe0b86793f810c5 (patch)
tree24e0e74f36ea2328c7f49145a13dffde4d510b21 /src/core
parent5bcddc89a9124e8f48dab1c8a6828236f2968c70 (diff)
Discard the read buffer on stream error
Diffstat (limited to 'src/core')
-rw-r--r--src/core/transport/chttp2_transport.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 617d98875c..c3efc36cc5 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1019,6 +1019,11 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx,
stream_global->recv_initial_metadata_ready = NULL;
}
if (stream_global->recv_message_ready != NULL) {
+ while (stream_global->seen_error &&
+ (bs = grpc_chttp2_incoming_frame_queue_pop(
+ &stream_global->incoming_frames)) != NULL) {
+ grpc_byte_stream_destroy(exec_ctx, bs);
+ }
if (stream_global->incoming_frames.head != NULL) {
*stream_global->recv_message = grpc_chttp2_incoming_frame_queue_pop(
&stream_global->incoming_frames);