# HG changeset patch # User Kim Alvefur # Date 1510963319 -3600 # Node ID 3fb5f173f21396ef5362ffcdc6b163e990f0e277 # Parent 4f9466be7b462118108f130f7e8db26d14637e64 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. diff -r 4f9466be7b46 -r 3fb5f173f213 mod_auth_external/mod_auth_external.lua --- 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;