Mercurial > prosody-modules
changeset 2830:92f6f82397c9
mod_auth_external: Shut down all auth processes when module is unloaded (fixes #674) (thanks ZNikke)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 18 Nov 2017 00:37:42 +0100 |
parents | 8082bfc10e65 |
children | d65868fed77a |
files | mod_auth_external/mod_auth_external.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_auth_external/mod_auth_external.lua Sat Nov 18 00:36:22 2017 +0100 +++ b/mod_auth_external/mod_auth_external.lua Sat Nov 18 00:37:42 2017 +0100 @@ -44,6 +44,12 @@ ptys[i] = lpty.new(pty_options); end +function module.unload() + for i = 1, auth_processes do + ptys[i]:endproc(); + end +end + local curr_process = 0; function send_query(text) curr_process = (curr_process%auth_processes)+1;