# HG changeset patch # User Kim Alvefur # Date 1616532371 -3600 # Node ID c90ef87457797ce6fe7ad94c2a5b1c6476573b57 # Parent 83e127eb91f932b1298435a46df40a093f2edad8 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 diff -r 83e127eb91f9 -r c90ef8745779 plugins/mod_c2s.lua --- a/plugins/mod_c2s.lua Tue Mar 23 19:52:59 2021 +0100 +++ b/plugins/mod_c2s.lua Tue Mar 23 21:46:11 2021 +0100 @@ -322,6 +322,7 @@ 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);