bug fix about ngx_http_upstream_fair_update_nreq #5

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

In #4

static void
ngx_http_upstream_fair_update_nreq(ngx_http_upstream_fair_peer_data_t *fp, int delta, ngx_log_t *log)
{
    #if (NGX_DEBUG)
    ...
    nreq = (fp->peers->peer[fp->current].shared->nreq += delta);
    total_nreq = (fp->peers->shared->total_nreq += delta);
    ...
    #endif
}

If there is no debug mode, ngx_http_upstream_fair_update_nreq has no effect.

Owner

gnosek commented Jan 30, 2012

Oops.

Does your patch compile cleanly with and without NGX_DEBUG? I'd be more comfortable with leaving the ifdef around ngx_log_debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment