changeset 5465:a279d2a33dbf

SPDY: drop the "delayed" flag when finalizing connection. This flag in SPDY fake write events serves the same purposes as the "ready" flag in real events, and it must be dropped if request needs to be handled. Otherwise, it can prevent the request from finalization if ngx_http_writer() was set, which results in a connection leak. Found by Xiaochen Wang.
author Valentin Bartenev <vbart@nginx.com>
date Tue, 10 Dec 2013 20:27:33 +0400
parents 30e806b8636a
children e7b3b9855be8
files src/http/ngx_http_spdy.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_spdy.c
+++ b/src/http/ngx_http_spdy.c
@@ -2855,7 +2855,9 @@ ngx_http_spdy_finalize_connection(ngx_ht
             if (stream->waiting) {
                 r->blocked -= stream->waiting;
                 stream->waiting = 0;
+
                 ev = fc->write;
+                ev->delayed = 0;
 
             } else {
                 ev = fc->read;