Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_grpc_module.c @ 8521:0302a4f0b6c4
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.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 17 Jun 2021 11:44:06 +0300 |
parents | 021416fca094 |
children | 41f4bd4c51f1 |
comparison
equal
deleted
inserted
replaced
8520:021416fca094 | 8521:0302a4f0b6c4 |
---|---|
2175 ctx->stream_id); | 2175 ctx->stream_id); |
2176 return NGX_ERROR; | 2176 return NGX_ERROR; |
2177 } | 2177 } |
2178 | 2178 |
2179 ctx->rst = 1; | 2179 ctx->rst = 1; |
2180 | |
2181 continue; | |
2180 } | 2182 } |
2181 | 2183 |
2182 if (ctx->type == NGX_HTTP_V2_GOAWAY_FRAME) { | 2184 if (ctx->type == NGX_HTTP_V2_GOAWAY_FRAME) { |
2183 | 2185 |
2184 rc = ngx_http_grpc_parse_goaway(r, ctx, b); | 2186 rc = ngx_http_grpc_parse_goaway(r, ctx, b); |
3482 | 3484 |
3483 if (ctx->rest > 0) { | 3485 if (ctx->rest > 0) { |
3484 return NGX_AGAIN; | 3486 return NGX_AGAIN; |
3485 } | 3487 } |
3486 | 3488 |
3489 ctx->state = ngx_http_grpc_st_start; | |
3490 | |
3487 return NGX_OK; | 3491 return NGX_OK; |
3488 } | 3492 } |
3489 | 3493 |
3490 | 3494 |
3491 static ngx_int_t | 3495 static ngx_int_t |