Software /
code /
prosody
Diff
plugins/mod_c2s.lua @ 11477:c90ef8745779
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 23 Mar 2021 21:46:11 +0100 |
parent | 11359:db146bf7b120 |
child | 11514:11186af62c87 |
line wrap: on
line diff
--- 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);