mirror of
https://github.com/nginx/nginx.git
synced 2024-12-24 08:00:14 -06:00
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.
This commit is contained in:
parent
dcdf7ec096
commit
693e4134a5
@ -2177,6 +2177,8 @@ ngx_http_grpc_filter(void *data, ssize_t bytes)
|
||||
}
|
||||
|
||||
ctx->rst = 1;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctx->type == NGX_HTTP_V2_GOAWAY_FRAME) {
|
||||
@ -3484,6 +3486,8 @@ ngx_http_grpc_parse_rst_stream(ngx_http_request_t *r, ngx_http_grpc_ctx_t *ctx,
|
||||
return NGX_AGAIN;
|
||||
}
|
||||
|
||||
ctx->state = ngx_http_grpc_st_start;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user