Welcome! Log In Create A New Profile


where assign values to rrp->peers->last_cached?

August 31, 2012 03:27AM
Assignment to the variable rrp->peers->last_cached cannot be found in anywhere in total nginx-1.3.5 source code, if the variable's default value is zero, this conditional will never be true:

ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
ngx_http_upstream_rr_peer_data_t *rrp = data;
if (rrp->peers->last_cached) { ==============>//never be true?

/* cached connection */

c = rrp->peers->cached[rrp->peers->last_cached];

/* ngx_unlock_mutex(ppr->peers->mutex); */

c->read->lock = c->read->own_lock;
c->write->lock = c->write->own_lock;

pc->connection = c;
pc->cached = 1;

return NGX_OK;

i don't know if i am missing something or not, can anyone help me understand this? Thank you in advance.
Subject Author Posted

where assign values to rrp->peers->last_cached?

lenky0401 August 31, 2012 03:27AM

Re: where assign values to rrp->peers->last_cached?

Maxim Dounin August 31, 2012 04:58AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 116
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 494 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready