[njs] Modules: fixed delete() method of a shared dictionary.

Dmitry Volyntsev xeioex at nginx.com
Fri Oct 20 15:46:17 UTC 2023


details:   https://hg.nginx.org/njs/rev/d83c6616f2b1
branches:  
changeset: 2223:d83c6616f2b1
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Fri Oct 20 08:44:52 2023 -0700
description:
Modules: fixed delete() method of a shared dictionary.

This fixes #679 issue on Github.

diffstat:

 nginx/ngx_js_shared_dict.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 3a7526c8694c -r d83c6616f2b1 nginx/ngx_js_shared_dict.c
--- a/nginx/ngx_js_shared_dict.c	Wed Oct 18 18:36:00 2023 -0700
+++ b/nginx/ngx_js_shared_dict.c	Fri Oct 20 08:44:52 2023 -0700
@@ -1240,7 +1240,7 @@ ngx_js_dict_delete(njs_vm_t *vm, ngx_js_
     ngx_time_t          *tp;
     ngx_js_dict_node_t  *node;
 
-    ngx_rwlock_rlock(&dict->sh->rwlock);
+    ngx_rwlock_wlock(&dict->sh->rwlock);
 
     node = ngx_js_dict_lookup(dict, key);
 


More information about the nginx-devel mailing list