From 4db3828fa60d6d0d4114a04ab27f7824b1f89de9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 20 Nov 2015 00:19:17 +0900 Subject: [PATCH] Reset last_writelen to 0 when stream is removed from tree When stream is removed from tree, stream is either closed, or its remote flow control window is depleted. In the latter case, we schedule this stream as fast as possible if its remote window gets positive, since it did not sent anything in its turn. To achieve this, reset last_writelen to 0 when stream is removed from tree. --- lib/nghttp2_stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nghttp2_stream.c b/lib/nghttp2_stream.c index 1c67fe40..b0cd4652 100644 --- a/lib/nghttp2_stream.c +++ b/lib/nghttp2_stream.c @@ -166,6 +166,7 @@ static void stream_obq_remove(nghttp2_stream *stream) { stream->queued = 0; stream->cycle = 0; stream->descendant_last_cycle = 0; + stream->last_writelen = 0; if (stream_subtree_active(dep_stream)) { return;