commit 47746e9: [Fix] Fix settings reload

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Aug 7 18:56:09 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-08-07 19:35:58 +0100
URL: https://github.com/rspamd/rspamd/commit/47746e93d4b599b14ca33e414bde0a81dbcd08dd

[Fix] Fix settings reload

---
 lualib/lua_settings.lua | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lualib/lua_settings.lua b/lualib/lua_settings.lua
index 67a33bb58..1f4dd5a7c 100644
--- a/lualib/lua_settings.lua
+++ b/lualib/lua_settings.lua
@@ -193,6 +193,14 @@ local function register_settings_id(str, settings)
 
   if not post_init_added then
     rspamd_config:add_post_init(register_settings_cb)
+    rspamd_config:add_config_unload(function()
+      if post_init_added then
+        known_ids = {}
+        post_init_added = false
+      end
+      post_init_performed = false
+    end)
+
     post_init_added = true
   end
 


More information about the Commits mailing list