mod_saslauth: Don't throw errors in async code when connections are gone
Fixes #1515
--- a/plugins/mod_saslauth.lua Thu Mar 18 14:30:32 2021 +0100
+++ b/plugins/mod_saslauth.lua Thu Mar 18 14:30:47 2021 +0100
@@ -44,6 +44,7 @@
end
local function handle_status(session, status, ret, err_msg)
+ if session["sasl_handler"] == nil then return "failure", "connection-timeout", "Connection gone"; end
if status == "failure" then
module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg });
session.sasl_handler = session.sasl_handler:clean_clone();