Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
11476:83e127eb91f9 | 11477:c90ef8745779 |
---|---|
320 end | 320 end |
321 | 321 |
322 if c2s_timeout then | 322 if c2s_timeout then |
323 add_task(c2s_timeout, function () | 323 add_task(c2s_timeout, function () |
324 if session.type == "c2s_unauthed" then | 324 if session.type == "c2s_unauthed" then |
325 (session.log or log)("debug", "Connection still not authenticated after c2s_timeout=%gs, closing it", c2s_timeout); | |
325 session:close("connection-timeout"); | 326 session:close("connection-timeout"); |
326 end | 327 end |
327 end); | 328 end); |
328 end | 329 end |
329 | 330 |