Changeset

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
parents 11476:83e127eb91f9
children 11478:c0c4431ab27b
files plugins/mod_c2s.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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);