aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_saslauth.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index e4888b01..5ba53f21 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -44,7 +44,9 @@ local function build_reply(status, ret, err_msg)
end
local function handle_status(session, status, ret, err_msg)
- if session["sasl_handler"] == nil then return "failure", "connection-timeout", "Connection gone"; end
+ if not session.sasl_handler 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();