Skip to content

Commit

Permalink
fix CID-1478887
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Mar 13, 2019
1 parent e8f1473 commit 17805af
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/server/manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ static void swManager_kill_timeout_process(swTimer *timer, swTimer_node *tnode)

static void swManager_add_timeout_killer(swServer *serv, swWorker *workers, int n)
{
if (!serv->max_wait_time)
{
return;
}
/**
* separate old workers, free memory in the timer
*/
Expand All @@ -90,10 +94,8 @@ static void swManager_add_timeout_killer(swServer *serv, swWorker *workers, int
memcpy(reload_workers, workers, sizeof(swWorker) * n);
reload_info->reload_worker_num = n;
reload_info->workers = reload_workers;
if (serv->max_wait_time)
{
swTimer_add(&SwooleG.timer, (long) (serv->max_wait_time * 1000), 0, reload_info, swManager_kill_timeout_process);
}

swTimer_add(&SwooleG.timer, (long) (serv->max_wait_time * 1000), 0, reload_info, swManager_kill_timeout_process);
}

//create worker child proccess
Expand Down

0 comments on commit 17805af

Please sign in to comment.