aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 5a049e67..97186325 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -45,6 +45,9 @@ local function build_reply(status, ret, err_msg)
end
local function handle_status(session, status, ret, err_msg)
+ if not session.sasl_handler then
+ return "failure", "temporary-auth-failure", "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();