commit 9d0e80d: [Minor] Release redis pool after Lua state has been destroyed
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Oct 20 10:35:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-10-20 10:03:37 +0100
URL: https://github.com/rspamd/rspamd/commit/9d0e80ddbb913c85aee524a2c33a25493c4344b5
[Minor] Release redis pool after Lua state has been destroyed
---
src/libserver/cfg_utils.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 5c2bd63d7..cf80599ed 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -336,12 +336,6 @@ rspamd_config_free (struct rspamd_config *cfg)
rspamd_re_cache_unref (cfg->re_cache);
g_ptr_array_free (cfg->c_modules, TRUE);
-#ifdef WITH_HIREDIS
- if (cfg->redis_pool) {
- rspamd_redis_pool_destroy (cfg->redis_pool);
- }
-#endif
-
if (cfg->monitored_ctx) {
rspamd_monitored_ctx_destroy (cfg->monitored_ctx);
}
@@ -351,6 +345,12 @@ rspamd_config_free (struct rspamd_config *cfg)
lua_close (cfg->lua_state);
}
+#ifdef WITH_HIREDIS
+ if (cfg->redis_pool) {
+ rspamd_redis_pool_destroy (cfg->redis_pool);
+ }
+#endif
+
rspamd_upstreams_library_unref (cfg->ups_ctx);
HASH_CLEAR (hh, cfg->actions);
More information about the Commits
mailing list