From 42122c270a06583acdd79992e9257e02d253d008 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 8 Nov 2014 10:31:53 +0900 Subject: [PATCH] Don't reprioritize stream if it is not in dependency tree Normally stream is in dependency tree, but sometimes it isn't. For example, client does not put pushed reserved stream in dependency tree. --- lib/nghttp2_session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index af4bd872..d3fd30a9 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -573,6 +573,10 @@ int nghttp2_session_reprioritize_stream nghttp2_stream *dep_stream; nghttp2_stream *root_stream; + if(!nghttp2_stream_in_dep_tree(stream)) { + return 0; + } + if(pri_spec->stream_id == stream->stream_id) { return nghttp2_session_terminate_session_with_reason (session, NGHTTP2_PROTOCOL_ERROR, "depend on itself");