Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: refactored ngx_http_v2_send_output_queue().

Valentin Bartenev
July 19, 2016 01:38PM
details: http://hg.nginx.org/nginx/rev/b5d1c17181ca
branches:
changeset: 6641:b5d1c17181ca
user: Valentin Bartenev <vbart@nginx.com>
date: Tue Jul 19 20:34:02 2016 +0300
description:
HTTP/2: refactored ngx_http_v2_send_output_queue().

Now it returns NGX_AGAIN if there's still data to be sent.

diffstat:

src/http/v2/ngx_http_v2.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)

diffs (44 lines):

diff -r e78eca6bfaf0 -r b5d1c17181ca src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Tue Jul 19 20:31:09 2016 +0300
+++ b/src/http/v2/ngx_http_v2.c Tue Jul 19 20:34:02 2016 +0300
@@ -478,7 +478,7 @@ ngx_http_v2_send_output_queue(ngx_http_v
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_v
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_v

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:

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] HTTP/2: refactored ngx_http_v2_send_output_queue().

Valentin Bartenev 319 July 19, 2016 01:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready