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.
This commit is contained in:
Tatsuhiro Tsujikawa 2014-11-08 10:31:53 +09:00
parent 1348621d9e
commit 42122c270a
1 changed files with 4 additions and 0 deletions

View File

@ -573,6 +573,10 @@ int nghttp2_session_reprioritize_stream
nghttp2_stream *dep_stream; nghttp2_stream *dep_stream;
nghttp2_stream *root_stream; nghttp2_stream *root_stream;
if(!nghttp2_stream_in_dep_tree(stream)) {
return 0;
}
if(pri_spec->stream_id == stream->stream_id) { if(pri_spec->stream_id == stream->stream_id) {
return nghttp2_session_terminate_session_with_reason return nghttp2_session_terminate_session_with_reason
(session, NGHTTP2_PROTOCOL_ERROR, "depend on itself"); (session, NGHTTP2_PROTOCOL_ERROR, "depend on itself");