aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2014-08-27 20:44:11 +0400
committerValentin Bartenev <vbart@nginx.com>2014-08-27 20:44:11 +0400
commitc425f19daa48e00bc0d84d0e22eb1452bf3e9901 (patch)
treee97f637375a21d1a095d437dc20980c7fbecd285 /src/http/ngx_http_request.c
parentda46eed537a708e6aa978d3eb2253091b6525882 (diff)
downloadnginx-c425f19daa48e00bc0d84d0e22eb1452bf3e9901.tar.gz
nginx-c425f19daa48e00bc0d84d0e22eb1452bf3e9901.zip
SPDY: avoid setting timeout on stream events in ngx_http_writer().
The SPDY module doesn't expect timers can be set on stream events for reasons other than delaying output. But ngx_http_writer() could add timer on write event if the delayed flag wasn't set and nginx is waiting for AIO completion. That could cause delays in sending response over SPDY when file AIO was used.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 845ada322..2b932dee4 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2656,6 +2656,12 @@ ngx_http_writer(ngx_http_request_t *r)
if (r->buffered || r->postponed || (r == r->main && c->buffered)) {
+#if (NGX_HTTP_SPDY)
+ if (r->spdy_stream) {
+ return;
+ }
+#endif
+
if (!wev->delayed) {
ngx_add_timer(wev, clcf->send_timeout);
}