From 58d636abdb76d5634825f7c4f492d26e2cd63cce Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 2 Nov 2015 23:38:29 +0900 Subject: [PATCH] Revert 918f8cca36c4349a3b03f834201f3c4e181b32d9 For first scheduling, we might ignore weight. This is OK since weight is just a distribution of resource, rather than strict priority ordering. --- lib/nghttp2_stream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nghttp2_stream.c b/lib/nghttp2_stream.c index 3a5e4ad0..1c67fe40 100644 --- a/lib/nghttp2_stream.c +++ b/lib/nghttp2_stream.c @@ -114,8 +114,7 @@ static int stream_subtree_active(nghttp2_stream *stream) { */ static uint64_t stream_next_cycle(nghttp2_stream *stream, uint64_t last_cycle) { return last_cycle + - (stream->last_writelen + 1) * NGHTTP2_MAX_WEIGHT / - (uint32_t)stream->weight; + stream->last_writelen * NGHTTP2_MAX_WEIGHT / (uint32_t)stream->weight; } static int stream_obq_push(nghttp2_stream *dep_stream, nghttp2_stream *stream) {