Honor stream->weight even if stream->last_writelen is 0

This commit is contained in:
Tatsuhiro Tsujikawa 2015-09-09 21:20:59 +09:00
parent 22b39f0337
commit 918f8cca36
1 changed files with 1 additions and 1 deletions

View File

@ -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) {