File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1278,8 +1278,10 @@ static ngx_int_t ngx_http_clojure_init_upstreams_load_balancer_helper(ngx_http_u
1278
1278
ngx_http_clojure_srv_conf_t * scf ;
1279
1279
ngx_uint_t s ;
1280
1280
for (s = 0 ; s < umcf -> upstreams .nelts ; s ++ ) {
1281
- scf = uscf [s ]-> srv_conf [ngx_http_clojure_module .ctx_index ];
1282
- ngx_http_clojure_init_handler_script (scf , NGX_HTTP_LOAD_BALANCE_PHASE , load_balancer );
1281
+ if (uscf [s ]-> srv_conf != NULL ) {
1282
+ scf = uscf [s ]-> srv_conf [ngx_http_clojure_module .ctx_index ];
1283
+ ngx_http_clojure_init_handler_script (scf , NGX_HTTP_LOAD_BALANCE_PHASE , load_balancer );
1284
+ }
1283
1285
}
1284
1286
return NGX_OK ;
1285
1287
}
@@ -1402,7 +1404,7 @@ static ngx_int_t ngx_http_clojure_process_init(ngx_cycle_t *cycle) {
1402
1404
return NGX_ERROR ;
1403
1405
}
1404
1406
1405
- if (ngx_http_clojure_init_upstreams_load_balancer_helper (umcf ) != NGX_OK ) {
1407
+ if (mcf -> enable_load_balancer && ngx_http_clojure_init_upstreams_load_balancer_helper (umcf ) != NGX_OK ) {
1406
1408
return NGX_ERROR ;
1407
1409
}
1408
1410
You can’t perform that action at this time.
0 commit comments