File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1878,7 +1878,12 @@ ngx_stream_upsync_init_module(ngx_cycle_t *cycle)
1878
1878
ngx_uint_t i ;
1879
1879
ngx_stream_upsync_server_t * upsync_server ;
1880
1880
ngx_stream_upsync_srv_conf_t * upscf ;
1881
-
1881
+
1882
+ // no stream {} block found
1883
+ if (upsync_ctx == NULL ) {
1884
+ return NGX_OK ;
1885
+ }
1886
+
1882
1887
upsync_server = upsync_ctx -> upsync_server ;
1883
1888
1884
1889
if (ngx_stream_upsync_init_shm_mutex (cycle ) != NGX_OK ) {
@@ -1988,6 +1993,10 @@ ngx_stream_upsync_init_process(ngx_cycle_t *cycle)
1988
1993
ngx_stream_upsync_ctx_t * ctx ;
1989
1994
ngx_stream_upsync_server_t * upsync_server ;
1990
1995
1996
+ // no stream {} block found
1997
+ if (upsync_ctx == NULL ) {
1998
+ return NGX_OK ;
1999
+ }
1991
2000
upsync_server = upsync_ctx -> upsync_server ;
1992
2001
1993
2002
for (i = 0 ; i < upsync_ctx -> upstream_num ; i ++ ) {
You can’t perform that action at this time.
0 commit comments