Commit 2224b98c authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Remove duplicated dependency validation in nghttp2_session_reprioritize_stream

parent a7031da3
......@@ -601,15 +601,12 @@ nghttp2_session_reprioritize_stream(nghttp2_session *session,
nghttp2_priority_spec pri_spec_default;
const nghttp2_priority_spec *pri_spec = pri_spec_in;
assert(pri_spec->stream_id != stream->stream_id);
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");
}
if (pri_spec->stream_id != 0) {
dep_stream = nghttp2_session_get_stream_raw(session, pri_spec->stream_id);
......
......@@ -731,7 +731,8 @@ int nghttp2_session_update_local_settings(nghttp2_session *session,
/*
* Re-prioritize |stream|. The new priority specification is
* |pri_spec|.
* |pri_spec|. Caller must ensure that stream->hd.stream_id !=
* pri_spec->stream_id.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment