Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix crash in status handler if called right after reload

  • Loading branch information...
commit 79946ba334ba10f9e2a469961fc58004e5479579 1 parent be0d30a
Grzegorz Nosek authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  ngx_http_upstream_fair_module.c
3  ngx_http_upstream_fair_module.c
View
@@ -1147,6 +1147,9 @@ ngx_http_upstream_fair_walk_status(ngx_pool_t *pool, ngx_chain_t *cl, ngx_int_t
for (i = 0; i < peers->number; i++) {
ngx_http_upstream_fair_peer_t *peer = &peers->peer[i];
ngx_http_upstream_fair_shared_t *sh = peer->shared;
+ if (!sh) {
+ continue;
+ }
b->last = ngx_sprintf(b->last, " peer %d: %V weight: %d/%d, fails: %d/%d, acc: %d, down: %d, nreq: %d, total_req: %ui, last_req: %ui\n",
i, &peer->name, sh->current_weight, peer->weight, sh->fails, peer->max_fails, peer->accessed, peer->down,
sh->nreq, sh->total_req, sh->last_req_id);
Please sign in to comment.
Something went wrong with that request. Please try again.