Changeset

2834:3fb5f173f213

mod_auth_external: Make sure processes are killed when Prosody shuts down This is needed because modules aren't unloaded during shutdown. The global server-cleanup event seems appropriate to use here.
author Kim Alvefur <zash@zash.se>
date Sat, 18 Nov 2017 01:01:59 +0100
parents 2833:4f9466be7b46
children 2835:b69ef062806e
files mod_auth_external/mod_auth_external.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_external/mod_auth_external.lua	Sat Nov 18 00:47:44 2017 +0100
+++ b/mod_auth_external/mod_auth_external.lua	Sat Nov 18 01:01:59 2017 +0100
@@ -50,6 +50,8 @@
 	end
 end
 
+module:hook_global("server-cleanup", module.unload);
+
 local curr_process = 0;
 function send_query(text)
 	curr_process = (curr_process%auth_processes)+1;