Welcome! Log In Create A New Profile

Advanced

[nginx] gRPC: RST_STREAM(NO_ERROR) handling micro-optimization.

Sergey Kandaurov
June 17, 2021 05:50AM
details: https://hg.nginx.org/nginx/rev/0302a4f0b6c4
branches:
changeset: 7873:0302a4f0b6c4
user: Sergey Kandaurov <pluknet@nginx.com>
date: Thu Jun 17 11:44:06 2021 +0300
description:
gRPC: RST_STREAM(NO_ERROR) handling micro-optimization.

After 2096b21fcd10, a single RST_STREAM(NO_ERROR) may not result in an error.
This change removes several unnecessary ctx->type checks for such a case.

diffstat:

src/http/modules/ngx_http_grpc_module.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diffs (21 lines):

diff -r 021416fca094 -r 0302a4f0b6c4 src/http/modules/ngx_http_grpc_module.c
--- a/src/http/modules/ngx_http_grpc_module.c Thu Jun 17 11:43:55 2021 +0300
+++ b/src/http/modules/ngx_http_grpc_module.c Thu Jun 17 11:44:06 2021 +0300
@@ -2177,6 +2177,8 @@ ngx_http_grpc_filter(void *data, ssize_t
}

ctx->rst = 1;
+
+ continue;
}

if (ctx->type == NGX_HTTP_V2_GOAWAY_FRAME) {
@@ -3484,6 +3486,8 @@ ngx_http_grpc_parse_rst_stream(ngx_http_
return NGX_AGAIN;
}

+ ctx->state = ngx_http_grpc_st_start;
+
return NGX_OK;
}

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

[nginx] gRPC: RST_STREAM(NO_ERROR) handling micro-optimization.

Sergey Kandaurov 117 June 17, 2021 05:50AM



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

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready