# HG changeset patch # User Sergey Kandaurov # Date 1623919446 -10800 # Node ID 0302a4f0b6c49446ffab36255c5ad579c2add5d3 # Parent 021416fca094d4b76c3ea81638e4fe1d20ab5976 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. diff --git a/src/http/modules/ngx_http_grpc_module.c b/src/http/modules/ngx_http_grpc_module.c --- a/src/http/modules/ngx_http_grpc_module.c +++ b/src/http/modules/ngx_http_grpc_module.c @@ -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; }