Mercurial > hg > nginx
comparison src/os/unix/ngx_process_cycle.c @ 6930:97c99bb43737
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 07 Mar 2017 18:51:16 +0300 |
parents | 3069dd358ba2 |
children | d45072375572 |
comparison
equal
deleted
inserted
replaced
6929:3069dd358ba2 | 6930:97c99bb43737 |
---|---|
761 "gracefully shutting down"); | 761 "gracefully shutting down"); |
762 ngx_setproctitle("worker process is shutting down"); | 762 ngx_setproctitle("worker process is shutting down"); |
763 | 763 |
764 if (!ngx_exiting) { | 764 if (!ngx_exiting) { |
765 ngx_exiting = 1; | 765 ngx_exiting = 1; |
766 ngx_set_shutdown_timer(cycle); | |
766 ngx_close_listening_sockets(cycle); | 767 ngx_close_listening_sockets(cycle); |
767 ngx_close_idle_connections(cycle); | 768 ngx_close_idle_connections(cycle); |
768 } | 769 } |
769 } | 770 } |
770 | 771 |