Previously, once received from upstream, it couldn't limit
opening additional streams in a cached keepalive connection.
unsigned done:1;
unsigned status:1;
unsigned rst:1;
+ unsigned goaway:1;
ngx_http_request_t *request;
ctx->done = 0;
ctx->status = 0;
ctx->rst = 0;
+ ctx->goaway = 0;
ctx->connection = NULL;
return NGX_OK;
&& ctx->out == NULL
&& ctx->output_closed
&& !ctx->output_blocked
+ && !ctx->goaway
&& ctx->state == ngx_http_grpc_st_start)
{
u->keepalive = 1;
return NGX_HTTP_UPSTREAM_INVALID_HEADER;
}
+ ctx->goaway = 1;
+
continue;
}
&& ctx->out == NULL
&& ctx->output_closed
&& !ctx->output_blocked
+ && !ctx->goaway
&& b->last == b->pos)
{
u->keepalive = 1;
if (ctx->in == NULL
&& ctx->output_closed
&& !ctx->output_blocked
+ && !ctx->goaway
&& ctx->state == ngx_http_grpc_st_start)
{
u->keepalive = 1;
return NGX_ERROR;
}
+ ctx->goaway = 1;
+
continue;
}