Software /
code /
prosody
Changeset
13384:57ad1dfd8e8b
mod_c2s: Make c2s_timeout timer reachable to allow access from other modules
E.g. the timeout could be extended under certain conditions.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 03 Dec 2023 15:46:33 +0100 |
parents | 13383:091667bd2f0e |
children | 13385:72d7830505f0 |
files | plugins/mod_c2s.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Sun Dec 03 15:44:15 2023 +0100 +++ b/plugins/mod_c2s.lua Sun Dec 03 15:46:33 2023 +0100 @@ -369,10 +369,12 @@ end if c2s_timeout < math.huge then - add_task(c2s_timeout, function () + session.c2s_timeout = 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"); + else + session.c2s_timeout = nil; end end); end