GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: The fair load balancer module for nginx
Homepage: http://nginx.localdomain.pl
Clone URL: git://github.com/gnosek/nginx-upstream-fair.git
Fix crash in status handler if called right after reload
gnosek (author)
Tue Sep 16 14:21:58 -0700 2008
commit  79946ba334ba10f9e2a469961fc58004e5479579
tree    5773a99e42a20223b4e4cfbee188f50ca01a9c74
parent  be0d30a0c1de5596dfc70e4b2e345013b44730d9
...
1147
1148
1149
 
 
 
1150
1151
1152
...
1147
1148
1149
1150
1151
1152
1153
1154
1155
0
@@ -1147,6 +1147,9 @@ ngx_http_upstream_fair_walk_status(ngx_pool_t *pool, ngx_chain_t *cl, ngx_int_t
0
     for (i = 0; i < peers->number; i++) {
0
         ngx_http_upstream_fair_peer_t *peer = &peers->peer[i];
0
         ngx_http_upstream_fair_shared_t *sh = peer->shared;
0
+ if (!sh) {
0
+ continue;
0
+ }
0
         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",
0
             i, &peer->name, sh->current_weight, peer->weight, sh->fails, peer->max_fails, peer->accessed, peer->down,
0
             sh->nreq, sh->total_req, sh->last_req_id);

Comments

    No one has commented yet.