diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2017-03-07 18:51:16 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2017-03-07 18:51:16 +0300 |
commit | 12b9974d510d38574c6cfb28ee3e87540230c56e (patch) | |
tree | cf66752182343de8606a9ac2d9625508d574356b /src/os | |
parent | 1a58418ae76a96c830a0536432e96a9ad051bc58 (diff) |
Introduced worker_shutdown_timeout.
The directive configures a timeout to be used when gracefully shutting down
worker processes. When the timer expires, nginx will try to close all
the connections currently open to facilitate shutdown.
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 1 | ||||
-rw-r--r-- | src/os/win32/ngx_process_cycle.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index d0c61143e..785888fc4 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -763,6 +763,7 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) if (!ngx_exiting) { ngx_exiting = 1; + ngx_set_shutdown_timer(cycle); ngx_close_listening_sockets(cycle); ngx_close_idle_connections(cycle); } diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c index 5b2df3858..293b967ec 100644 --- a/src/os/win32/ngx_process_cycle.c +++ b/src/os/win32/ngx_process_cycle.c @@ -800,6 +800,7 @@ ngx_worker_thread(void *data) if (!ngx_exiting) { ngx_exiting = 1; + ngx_set_shutdown_timer(cycle); ngx_close_listening_sockets(cycle); ngx_close_idle_connections(cycle); } |