Comparison

plugins/mod_c2s.lua @ 13230:26c30844cac6

plugins: Handle how get_option_period returns "never"
author Kim Alvefur <zash@zash.se>
date Fri, 21 Jul 2023 17:23:00 +0200
parent 13213:50324f66ca2a
comparison
equal deleted inserted replaced
13229:bb7177efbf41 13230:26c30844cac6
365 end 365 end
366 end 366 end
367 end 367 end
368 end 368 end
369 369
370 if c2s_timeout then 370 if c2s_timeout < math.huge then
371 add_task(c2s_timeout, function () 371 add_task(c2s_timeout, function ()
372 if session.type == "c2s_unauthed" then 372 if session.type == "c2s_unauthed" then
373 (session.log or log)("debug", "Connection still not authenticated after c2s_timeout=%gs, closing it", c2s_timeout); 373 (session.log or log)("debug", "Connection still not authenticated after c2s_timeout=%gs, closing it", c2s_timeout);
374 session:close("connection-timeout"); 374 session:close("connection-timeout");
375 end 375 end