Welcome! Log In Create A New Profile

Advanced

[njs] Fixed js_periodic handler stopping after graceful shutdown.

Dmitry Volyntsev
August 31, 2023 12:02AM
details: https://hg.nginx.org/njs/rev/77bdb1e544da
branches:
changeset: 2188:77bdb1e544da
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed Aug 30 20:59:11 2023 -0700
description:
Fixed js_periodic handler stopping after graceful shutdown.

The issue was introduced in f1bd0b1db065.

diffstat:

nginx/ngx_http_js_module.c | 4 ++++
nginx/ngx_stream_js_module.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r 3fe16507f80a -r 77bdb1e544da nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c Wed Aug 30 18:59:28 2023 -0700
+++ b/nginx/ngx_http_js_module.c Wed Aug 30 20:59:11 2023 -0700
@@ -4102,6 +4102,10 @@ ngx_http_js_periodic_handler(ngx_event_t
ngx_http_request_t *r;
ngx_http_connection_t hc;

+ if (ngx_terminate || ngx_exiting) {
+ return;
+ }
+
periodic = ev->data;

timer = periodic->interval;
diff -r 3fe16507f80a -r 77bdb1e544da nginx/ngx_stream_js_module.c
--- a/nginx/ngx_stream_js_module.c Wed Aug 30 18:59:28 2023 -0700
+++ b/nginx/ngx_stream_js_module.c Wed Aug 30 20:59:11 2023 -0700
@@ -1815,6 +1815,10 @@ ngx_stream_js_periodic_handler(ngx_event
ngx_stream_session_t *s;
ngx_stream_core_main_conf_t *cmcf;

+ if (ngx_terminate || ngx_exiting) {
+ return;
+ }
+
periodic = ev->data;

timer = periodic->interval;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed js_periodic handler stopping after graceful shutdown.

Dmitry Volyntsev 336 August 31, 2023 12:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 239
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready