# HG changeset patch # User Kim Alvefur # Date 1510961862 -3600 # Node ID 92f6f82397c9b200249a569736bbd6c6e6dd4c09 # Parent 8082bfc10e6579ae284ac4949a5e09e8b88a15e4 mod_auth_external: Shut down all auth processes when module is unloaded (fixes #674) (thanks ZNikke) diff -r 8082bfc10e65 -r 92f6f82397c9 mod_auth_external/mod_auth_external.lua --- 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;