Diff

mod_auth_external/mod_auth_external.lua @ 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
parent 2829:8082bfc10e65
child 2834:3fb5f173f213
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;