From 22a3dfd95468daa0db7245a4e8e6679a52847579 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 4 Apr 2016 14:38:05 -0700 Subject: [PATCH] Fix stream id order handling --- src/core/ext/transport/chttp2/transport/parsing.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index c754c6005e1..e827a43f7a4 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -112,7 +112,7 @@ void grpc_chttp2_publish_reads( GOAWAY last-grpc_chttp2_stream-id=0 in this case. */ if (!transport_parsing->is_client) { transport_global->last_incoming_stream_id = - transport_parsing->incoming_stream_id; + transport_parsing->last_incoming_stream_id; } /* update global settings */ @@ -371,7 +371,9 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, if (!init_frame_parser(exec_ctx, transport_parsing)) { return 0; } - if (transport_parsing->incoming_stream_id) { + if (transport_parsing->incoming_stream_id != 0 && + transport_parsing->incoming_stream_id > + transport_parsing->last_incoming_stream_id) { transport_parsing->last_incoming_stream_id = transport_parsing->incoming_stream_id; }