aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_c2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-05-31 22:39:34 +0200
committerKim Alvefur <zash@zash.se>2020-05-31 22:39:34 +0200
commit958854febd6c30b93e36efeab4c0046fb1bd9b1b (patch)
tree2bd65e32f758ac9506a77b413b95faac81e22a3b /plugins/mod_c2s.lua
parent4051f5e653a65d4edd360a32b5dac9e231b02a99 (diff)
downloadprosody-958854febd6c30b93e36efeab4c0046fb1bd9b1b.tar.gz
prosody-958854febd6c30b93e36efeab4c0046fb1bd9b1b.zip
mod_c2s,mod_s2s: Make stanza size limits configurablevault/0.11.7
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r--plugins/mod_c2s.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 15d3a9be..c648850f 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -26,6 +26,7 @@ local log = module._log;
local c2s_timeout = module:get_option_number("c2s_timeout", 300);
local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5);
local opt_keepalives = module:get_option_boolean("c2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
+local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit"); -- TODO come up with a sensible default (util.xmppstream defaults to 10M)
local measure_connections = module:measure("connections", "amount");
local measure_ipv6 = module:measure("ipv6", "amount");
@@ -262,7 +263,7 @@ function listener.onconnect(conn)
session.close = session_close;
- local stream = new_xmpp_stream(session, stream_callbacks);
+ local stream = new_xmpp_stream(session, stream_callbacks, stanza_size_limit);
session.stream = stream;
session.notopen = true;