aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmolitor <thilo@eightysoft.de>2021-03-18 14:30:47 +0100
committertmolitor <thilo@eightysoft.de>2021-03-18 14:30:47 +0100
commita7cc31c6bb735536d07b5578fbd3ed3ac3ba01ec (patch)
treed8d73c941afaf4cf2142a597e83ab70470e28b03
parent2b0c472f871d404852dd50e97868165920a10f9b (diff)
downloadprosody-a7cc31c6bb735536d07b5578fbd3ed3ac3ba01ec.tar.gz
prosody-a7cc31c6bb735536d07b5578fbd3ed3ac3ba01ec.zip
mod_saslauth: Don't throw errors in async code when connections are gone
Fixes #1515
-rw-r--r--plugins/mod_saslauth.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index e8bca7c3..e4888b01 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -44,6 +44,7 @@ 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 status == "failure" then
module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg });
session.sasl_handler = session.sasl_handler:clean_clone();