diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2024-01-31 17:06:58 -0800 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2024-01-31 17:06:58 -0800 |
commit | 4bc7dc3a20d0095951fc942d92fee7235d9999c8 (patch) | |
tree | 259f0958d57f15a50c645fbe18bcc839203d8d00 /nginx/ngx_http_js_module.c | |
parent | 6a12645ab47e619fdd38fb01c3f5816458dc1d47 (diff) | |
download | njs-4bc7dc3a20d0095951fc942d92fee7235d9999c8.tar.gz njs-4bc7dc3a20d0095951fc942d92fee7235d9999c8.zip |
HTTP: fixed stub_status statistic when js_periodic is enabled.
Previously, when js_periodic is enabled the Reading statistic
was growing each time the js_periodic handler was called.
The issue was introduced in f1bd0b1db065 (0.8.1).
This fixes #692 issue on Github.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index 327f0f28..bd77e853 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -4323,30 +4323,24 @@ ngx_http_js_periodic_finalize(ngx_http_request_t *r, ngx_int_t rc) static void ngx_http_js_periodic_destroy(ngx_http_request_t *r, ngx_js_periodic_t *periodic) { - ngx_connection_t *c; - ngx_http_cleanup_t *cln; + ngx_connection_t *c; c = r->connection; ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, - "http js periodic destroy: \"%V\"", - &periodic->method); + "http js periodic destroy: \"%V\"", &periodic->method); periodic->connection = NULL; - for (cln = r->cleanup; cln; cln = cln->next) { - if (cln->handler) { - cln->handler(cln->data); - } - } + r->logged = 1; + + ngx_http_free_request(r, NGX_OK); ngx_free_connection(c); c->fd = (ngx_socket_t) -1; c->pool = NULL; c->destroyed = 1; - - ngx_destroy_pool(r->pool); } |