# HG changeset patch # User Valentin Bartenev # Date 1490807783 -10800 # Node ID 9b5f31fdb850b5148abe610eb499d6d4f3ee9395 # Parent d38161da62cd6524b669d496dee67bad5ca4c4b0 HTTP/2: fixed stream finalization. In order to finalize stream the error flag is set on fake connection and either "write" or "read" event handler is called. The read events of fake connections are always ready, but it's not the case with the write events. When the ready flag isn't set, the error flag can be not checked in some cases and as a result stream isn't finalized. Now the ready flag is explicilty set on write events for proper finalization in all cases. diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -4266,7 +4266,10 @@ ngx_http_v2_finalize_connection(ngx_http if (stream->queued) { stream->queued = 0; + ev = fc->write; + ev->active = 0; + ev->ready = 1; } else { ev = fc->read;