aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_stream_js_module.c
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2023-08-30 20:59:11 -0700
committerDmitry Volyntsev <xeioex@nginx.com>2023-08-30 20:59:11 -0700
commit3b53739a550680c33d0dd33ba1b7cb2587b6d5db (patch)
treec847316bedf63ea7199de734cdd82b5233ba90cb /nginx/ngx_stream_js_module.c
parent4a86e19000ecb36e9409b03abad2dd727714a0ca (diff)
downloadnjs-3b53739a550680c33d0dd33ba1b7cb2587b6d5db.tar.gz
njs-3b53739a550680c33d0dd33ba1b7cb2587b6d5db.zip
Fixed js_periodic handler stopping after graceful shutdown.
The issue was introduced in f1bd0b1db065.
Diffstat (limited to 'nginx/ngx_stream_js_module.c')
-rw-r--r--nginx/ngx_stream_js_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nginx/ngx_stream_js_module.c b/nginx/ngx_stream_js_module.c
index ab66de9d..8a0d6451 100644
--- a/nginx/ngx_stream_js_module.c
+++ b/nginx/ngx_stream_js_module.c
@@ -1815,6 +1815,10 @@ ngx_stream_js_periodic_handler(ngx_event_t *ev)
ngx_stream_session_t *s;
ngx_stream_core_main_conf_t *cmcf;
+ if (ngx_terminate || ngx_exiting) {
+ return;
+ }
+
periodic = ev->data;
timer = periodic->interval;