diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index be2d3d38..7c6207d7 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -973,15 +973,6 @@ nghttp2_stream *nghttp2_session_open_stream(nghttp2_session *session, } } - /* We don't have to track dependency of received reserved stream */ - if (stream->shut_flags & NGHTTP2_SHUT_WR) { - return stream; - } - - /* TODO Client does not have to track dependencies of streams except - for those which have upload data. Currently, we just track - everything. */ - if (pri_spec->stream_id == 0) { dep_stream = &session->root; } diff --git a/tests/nghttp2_session_test.c b/tests/nghttp2_session_test.c index 7a0df3e8..5a6610be 100644 --- a/tests/nghttp2_session_test.c +++ b/tests/nghttp2_session_test.c @@ -4886,7 +4886,7 @@ void test_nghttp2_session_open_stream(void) { NGHTTP2_STREAM_RESERVED, NULL); CU_ASSERT(0 == session->num_incoming_streams); CU_ASSERT(0 == session->num_outgoing_streams); - CU_ASSERT(NULL == stream->dep_prev); + CU_ASSERT(&session->root == stream->dep_prev); CU_ASSERT(NGHTTP2_DEFAULT_WEIGHT == stream->weight); CU_ASSERT(NGHTTP2_SHUT_WR == stream->shut_flags);