Skip to content

Commit 44dcf93

Browse files
committed
update reload cycle zero download
1 parent 94f484c commit 44dcf93

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ngx_link_func_module.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ ngx_module_t ngx_http_link_func_module = {
319319
ngx_http_link_func_commands, /* module directives */
320320
NGX_HTTP_MODULE, /* module type */
321321
NULL, /* init master */
322-
ngx_http_link_func_module_init, /* init module */
322+
NULL, // ngx_http_link_func_module_init, /* init module */ move module init into process init function to make it reload every time
323323
ngx_http_link_func_process_init, /* init process */
324324
NULL, /* init thread */
325325
NULL, /* exit thread */
@@ -821,6 +821,10 @@ ngx_http_link_func_process_init(ngx_cycle_t *cycle) {
821821
return NGX_OK;
822822
}
823823

824+
if (ngx_http_link_func_module_init(cycle) == NGX_ERROR) {
825+
return NGX_ERROR;
826+
}
827+
824828
ngx_http_conf_ctx_t *ctx = (ngx_http_conf_ctx_t *)ngx_get_conf(cycle->conf_ctx, ngx_http_module);
825829

826830
cmcf = ctx->main_conf[ngx_http_core_module.ctx_index];

0 commit comments

Comments
 (0)