Welcome! Log In Create A New Profile

Advanced

ngx_http_upstream_process_non_buffered_request recv question

July 13, 2016 11:09PM
size = b->end - b->last;

if (size && upstream->read->ready) {

n = upstream->recv(upstream, b->last, size);

if (n == NGX_AGAIN) {
break;
}

if (n > 0) {
u->state->response_length += n;

if (u->input_filter(u->input_filter_ctx, n) == NGX_ERROR) {
ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
return;
}
}

do_write = 1;

continue;
}

Why not consider n==0 or n==NGX_ERROR as ngx_http_upstream_process_upgraded
How handle it if upstream connection failed?
Subject Author Posted

ngx_http_upstream_process_non_buffered_request recv question

gaoyan09 July 13, 2016 11:09PM

Re: ngx_http_upstream_process_non_buffered_request recv question

Maxim Dounin July 14, 2016 09:02AM

Re: ngx_http_upstream_process_non_buffered_request recv question

gaoyan09 July 14, 2016 09:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 322
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready