aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2016-07-19 20:34:02 +0300
committerValentin Bartenev <vbart@nginx.com>2016-07-19 20:34:02 +0300
commit3c81c08ceae2c22cf5d2ba1b637d685e397a68f2 (patch)
tree729958b49575eb9ad714cee3764e45b93f00eafa /src
parent3b2f54bc2ea0d9d34b3e181f1221a050824e1c1a (diff)
downloadnginx-3c81c08ceae2c22cf5d2ba1b637d685e397a68f2.tar.gz
nginx-3c81c08ceae2c22cf5d2ba1b637d685e397a68f2.zip
HTTP/2: refactored ngx_http_v2_send_output_queue().
Now it returns NGX_AGAIN if there's still data to be sent.
Diffstat (limited to 'src')
-rw-r--r--src/http/v2/ngx_http_v2.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 0ce8bce26..292f430a7 100644
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -478,7 +478,7 @@ ngx_http_v2_send_output_queue(ngx_http_v2_connection_t *h2c)
wev = c->write;
if (!wev->ready) {
- return NGX_OK;
+ return NGX_AGAIN;
}
cl = NULL;
@@ -549,15 +549,6 @@ ngx_http_v2_send_output_queue(ngx_http_v2_connection_t *h2c)
c->tcp_nodelay = NGX_TCP_NODELAY_SET;
}
- if (!wev->ready) {
- ngx_add_timer(wev, clcf->send_timeout);
-
- } else {
- if (wev->timer_set) {
- ngx_del_timer(wev);
- }
- }
-
for ( /* void */ ; out; out = fn) {
fn = out->next;
@@ -582,6 +573,15 @@ ngx_http_v2_send_output_queue(ngx_http_v2_connection_t *h2c)
h2c->last_out = frame;
+ if (!wev->ready) {
+ ngx_add_timer(wev, clcf->send_timeout);
+ return NGX_AGAIN;
+ }
+
+ if (wev->timer_set) {
+ ngx_del_timer(wev);
+ }
+
return NGX_OK;
error: