[njs] Stream: fixed counting pending events.
Dmitry Volyntsev
xeioex at nginx.com
Thu Oct 4 17:55:05 UTC 2018
details: http://hg.nginx.org/njs/rev/f72e19b699e3
branches:
changeset: 621:f72e19b699e3
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Thu Oct 04 20:45:40 2018 +0300
description:
Stream: fixed counting pending events.
Previously, erroneous messages 'pending events' were reported
to error log.
diffstat:
nginx/ngx_stream_js_module.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r 2383666ab775 -r f72e19b699e3 nginx/ngx_stream_js_module.c
--- a/nginx/ngx_stream_js_module.c Thu Oct 04 20:43:25 2018 +0300
+++ b/nginx/ngx_stream_js_module.c Thu Oct 04 20:45:40 2018 +0300
@@ -749,6 +749,16 @@ ngx_stream_js_cleanup_ctx(void *data)
{
ngx_stream_js_ctx_t *ctx = data;
+ if (ctx->upload_event != NULL) {
+ njs_vm_del_event(ctx->vm, ctx->upload_event);
+ ctx->upload_event = NULL;
+ }
+
+ if (ctx->download_event != NULL) {
+ njs_vm_del_event(ctx->vm, ctx->download_event);
+ ctx->download_event = NULL;
+ }
+
if (njs_vm_pending(ctx->vm)) {
ngx_log_error(NGX_LOG_ERR, ctx->log, 0, "pending events");
}
More information about the nginx-devel
mailing list