Comparison

plugins/mod_component.lua @ 13213:50324f66ca2a

plugins: Use integer config API with interval specification where sensible Many of these fall into a few categories: - util.cache size, must be >= 1 - byte or item counts that logically can't be negative - port numbers that should be in 1..0xffff
author Kim Alvefur <zash@zash.se>
date Mon, 17 Jul 2023 01:38:54 +0200
parent 13202:173038306750
comparison
equal deleted inserted replaced
13212:3e6e98cc63e9 13213:50324f66ca2a
25 local hosts = prosody.hosts; 25 local hosts = prosody.hosts;
26 26
27 local log = module._log; 27 local log = module._log;
28 28
29 local opt_keepalives = module:get_option_boolean("component_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true)); 29 local opt_keepalives = module:get_option_boolean("component_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
30 local stanza_size_limit = module:get_option_number("component_stanza_size_limit", module:get_option_number("s2s_stanza_size_limit", 1024*512)); 30 local stanza_size_limit = module:get_option_integer("component_stanza_size_limit",
31 module:get_option_integer("s2s_stanza_size_limit", 1024 * 512, 10000), 10000);
31 32
32 local sessions = module:shared("sessions"); 33 local sessions = module:shared("sessions");
33 34
34 local function keepalive(event) 35 local function keepalive(event)
35 local session = event.session; 36 local session = event.session;