Skip to content
Browse files

bug fix, ngx_http_upstream_fair_update_nreq has no effect with debug …

…mode
  • Loading branch information...
1 parent 5f6a3b7 commit 5320be7fcddee8f9958f137660b8defbc02b7b16 @atomd atomd committed
Showing with 4 additions and 9 deletions.
  1. +4 −9 ngx_http_upstream_fair_module.c
View
13 ngx_http_upstream_fair_module.c
@@ -645,18 +645,13 @@ ngx_http_upstream_init_fair(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *us)
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)
- ngx_uint_t nreq;
- ngx_uint_t total_nreq;
-
- nreq = (fp->peers->peer[fp->current].shared->nreq += delta);
- total_nreq = (fp->peers->shared->total_nreq += delta);
+ fp->peers->peer[fp->current].shared->nreq += delta;
+ fp->peers->shared->total_nreq += delta;
ngx_log_debug6(NGX_LOG_DEBUG_HTTP, log, 0,
"[upstream_fair] nreq for peer %ui @ %p/%p now %d, total %d, delta %d",
- fp->current, fp->peers, fp->peers->peer[fp->current].shared, nreq,
- total_nreq, delta);
-#endif
+ fp->current, fp->peers, fp->peers->peer[fp->current].shared,
+ fp->peers->peer[fp->current].shared->nreq, fp->peers->shared->total_nreq, delta);
}
/*

0 comments on commit 5320be7

Please sign in to comment.
Something went wrong with that request. Please try again.