Diff

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
child 13750:53c39fdb007f
line wrap: on
line diff
--- a/plugins/mod_component.lua	Mon Jul 17 00:37:44 2023 +0200
+++ b/plugins/mod_component.lua	Mon Jul 17 01:38:54 2023 +0200
@@ -27,7 +27,8 @@
 local log = module._log;
 
 local opt_keepalives = module:get_option_boolean("component_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
-local stanza_size_limit = module:get_option_number("component_stanza_size_limit", module:get_option_number("s2s_stanza_size_limit", 1024*512));
+local stanza_size_limit = module:get_option_integer("component_stanza_size_limit",
+	module:get_option_integer("s2s_stanza_size_limit", 1024 * 512, 10000), 10000);
 
 local sessions = module:shared("sessions");