diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-22 17:28:23 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-22 17:28:39 +0100 |
commit | 565ff219baf0c0ba5eb0b6e810fc503f93f0483a (patch) | |
tree | aec028777d65f6dd551e8edb449e6ede3be63cf9 | |
parent | 9c4d17fae88621a53b734f8508fe4455efe8181f (diff) | |
download | rspamd-565ff219baf0c0ba5eb0b6e810fc503f93f0483a.tar.gz rspamd-565ff219baf0c0ba5eb0b6e810fc503f93f0483a.zip |
[Minor] Fix issues in lua http
-rw-r--r-- | package.json | 5 | ||||
-rw-r--r-- | src/lua/lua_http.c | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/package.json b/package.json index 14ee2bd7b..75e42eff7 100644 --- a/package.json +++ b/package.json @@ -2,5 +2,8 @@ "devDependencies": { "eslint": "*" }, - "eslintIgnore": ["*.min.js", "interface/js/lib/domReady.js"] + "eslintIgnore": [ + "*.min.js", + "interface/js/lib/domReady.js" + ] } diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 1b78446a1..bd7cd97b7 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -150,11 +150,11 @@ lua_http_maybe_free (struct lua_http_cbdata *cbd) if (cbd->flags & RSPAMD_LUA_HTTP_FLAG_RESOLVED) { /* Event is added merely for resolved events */ - rspamd_session_remove_event (cbd->session, lua_http_fin, cbd); - } + if (cbd->item) { + rspamd_symcache_item_async_dec_check (cbd->task, cbd->item); + } - if (cbd->item) { - rspamd_symcache_item_async_dec_check (cbd->task, cbd->item); + rspamd_session_remove_event (cbd->session, lua_http_fin, cbd); } } else { @@ -946,7 +946,7 @@ lua_http_request (lua_State *L) return 1; } - else { + else if (cbd->item) { rspamd_symcache_item_async_inc (cbd->task, cbd->item); } } |