aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-03-23 21:46:11 +0100
committerKim Alvefur <zash@zash.se>2021-03-23 21:46:11 +0100
commitf7cfe660cd0e13759a5231638b3dc0a21b8b9dc2 (patch)
tree58625be5b2d53443e7fb4246d91c1c33ccde6fbd
parent204014578019d24c458550bad8fdb544b95190b3 (diff)
downloadprosody-f7cfe660cd0e13759a5231638b3dc0a21b8b9dc2.tar.gz
prosody-f7cfe660cd0e13759a5231638b3dc0a21b8b9dc2.zip
mod_c2s: Log a debug message before closing due to c2s_timeout
It was confusing that the connection would just close without much explanation. Wanted this while investigating https://github.com/conversejs/converse.js/issues/2438
-rw-r--r--plugins/mod_c2s.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index a1820029..878b853d 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -322,6 +322,7 @@ function listener.onconnect(conn)
if c2s_timeout then
add_task(c2s_timeout, function ()
if session.type == "c2s_unauthed" then
+ (session.log or log)("debug", "Connection still not authenticated after c2s_timeout=%gs, closing it", c2s_timeout);
session:close("connection-timeout");
end
end);