diff --git a/.release b/.release index 4d5c90b..0890e94 160000 --- a/.release +++ b/.release @@ -1 +1 @@ -Subproject commit 4d5c90b2c428d2cd9d5c35758b0071925f5a0f0a +Subproject commit 0890e945e4e061c96c7b2ab45017525904c17728 diff --git a/Changes.md b/Changes.md index 151c8da..9c6dcd0 100644 --- a/Changes.md +++ b/Changes.md @@ -2,6 +2,13 @@ #### N.N.N - YYYY-MM-DD +### [2.1.0] - 2022-11-29 + +- fix: in disconnect, call redis_unsub after skip check +- dep(redis): 4 -> 4.1 +- dep(pi-redis): 2 -> 2.0.5 + + #### 2.0.4 - 2022-05-28 - use .release as submodule @@ -97,3 +104,4 @@ #### 1.0.2 - 2017-01-24 - use redis.merge_redis_ini() +[2.1.0]: https://github.com/haraka/haraka-plugin-karma/releases/tag/2.1.0 diff --git a/index.js b/index.js index 715af79..fe7c0f3 100644 --- a/index.js +++ b/index.js @@ -684,10 +684,10 @@ exports.increment = function (connection, key, val) { exports.hook_disconnect = function (next, connection) { const plugin = this - plugin.redis_unsubscribe(connection) - if (plugin.should_we_skip(connection)) return next() + plugin.redis_unsubscribe(connection) + const k = connection.results.get('karma') if (!k || k.score === undefined) { connection.results.add(plugin, {err: 'karma results missing'}) @@ -708,7 +708,7 @@ exports.hook_disconnect = function (next, connection) { } connection.results.add(plugin, {emit: true }) - return next() + next() } exports.get_award_loc_from_note = function (connection, award) { diff --git a/package.json b/package.json index 0989b81..c8c38c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "haraka-plugin-karma", - "version": "2.0.4", + "version": "2.1.0", "description": "A heuristics scoring and reputation engine for SMTP connections", "main": "index.js", "scripts": { @@ -26,8 +26,8 @@ "address-rfc2821": "*", "haraka-constants": ">=1.0.2", "haraka-utils": "*", - "haraka-plugin-redis": "2", - "redis": "4" + "haraka-plugin-redis": "2.0.5", + "redis": "4.1" }, "devDependencies": { "eslint": "8",