]> git.kaiwu.me - nginx.git/commitdiff
SPDY: drop the "delayed" flag when finalizing connection.
authorValentin Bartenev <vbart@nginx.com>
Tue, 10 Dec 2013 16:27:33 +0000 (20:27 +0400)
committerValentin Bartenev <vbart@nginx.com>
Tue, 10 Dec 2013 16:27:33 +0000 (20:27 +0400)
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.

src/http/ngx_http_spdy.c

index 36e23be02f093455cfbafc0b3f741531e57933f7..2346ad7a1c8aaf912c163e19ba19a764cf382795 100644 (file)
@@ -2855,7 +2855,9 @@ ngx_http_spdy_finalize_connection(ngx_http_spdy_connection_t *sc,
             if (stream->waiting) {
                 r->blocked -= stream->waiting;
                 stream->waiting = 0;
+
                 ev = fc->write;
+                ev->delayed = 0;
 
             } else {
                 ev = fc->read;