From 44dcf930f90e7ad660273389a97d7b5f63e7ee63 Mon Sep 17 00:00:00 2001 From: taymindis Date: Sat, 15 Dec 2018 09:56:18 +0800 Subject: [PATCH] update reload cycle zero download --- src/ngx_link_func_module.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ngx_link_func_module.c b/src/ngx_link_func_module.c index 8d5a1a4..7109995 100644 --- a/src/ngx_link_func_module.c +++ b/src/ngx_link_func_module.c @@ -319,7 +319,7 @@ ngx_module_t ngx_http_link_func_module = { ngx_http_link_func_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ NULL, /* init master */ - ngx_http_link_func_module_init, /* init module */ + NULL, // ngx_http_link_func_module_init, /* init module */ move module init into process init function to make it reload every time ngx_http_link_func_process_init, /* init process */ NULL, /* init thread */ NULL, /* exit thread */ @@ -821,6 +821,10 @@ ngx_http_link_func_process_init(ngx_cycle_t *cycle) { return NGX_OK; } + if (ngx_http_link_func_module_init(cycle) == NGX_ERROR) { + return NGX_ERROR; + } + ngx_http_conf_ctx_t *ctx = (ngx_http_conf_ctx_t *)ngx_get_conf(cycle->conf_ctx, ngx_http_module); cmcf = ctx->main_conf[ngx_http_core_module.ctx_index];