Skip to content

Commit d33172c

Browse files
authored
Merge pull request yaoweibin#199 from zengjinji/only_worker_check
fix: only worker proccess can exec health check
2 parents 007f76f + 0a631ee commit d33172c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ngx_http_upstream_check_module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4062,6 +4062,10 @@ ngx_http_upstream_check_init_process(ngx_cycle_t *cycle)
40624062
{
40634063
ngx_http_upstream_check_main_conf_t *ucmcf;
40644064

4065+
if (ngx_process != NGX_PROCESS_WORKER) {
4066+
return NGX_OK;
4067+
}
4068+
40654069
ucmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_upstream_check_module);
40664070
if (ucmcf == NULL) {
40674071
return NGX_OK;

0 commit comments

Comments
 (0)