From 918f8cca36c4349a3b03f834201f3c4e181b32d9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 9 Sep 2015 21:20:59 +0900 Subject: [PATCH] Honor stream->weight even if stream->last_writelen is 0 --- lib/nghttp2_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_stream.c b/lib/nghttp2_stream.c index dc9ab462..cacece7e 100644 --- a/lib/nghttp2_stream.c +++ b/lib/nghttp2_stream.c @@ -113,7 +113,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 * NGHTTP2_MAX_WEIGHT / stream->weight; + (stream->last_writelen + 1) * NGHTTP2_MAX_WEIGHT / stream->weight; } static int stream_obq_push(nghttp2_stream *dep_stream, nghttp2_stream *stream) {