diff options
author | Kim Alvefur <zash@zash.se> | 2021-03-18 16:17:45 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-03-18 16:17:45 +0100 |
commit | 139cafdbafd73bd2d3359cda4bba2d389a8c87e1 (patch) | |
tree | ae533eaa6e8e39c3f156393428c511dd52a94406 | |
parent | 72cb2e0362b195131334c3a2b1c20dbb5f7398c7 (diff) | |
download | prosody-139cafdbafd73bd2d3359cda4bba2d389a8c87e1.tar.gz prosody-139cafdbafd73bd2d3359cda4bba2d389a8c87e1.zip |
mod_saslauth: Improve code style
This many returns deserve their own line.
`session["sasl_handler"]` style isn't used anywhere else.
-rw-r--r-- | plugins/mod_saslauth.lua | 4 |
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(); |