Comparison

plugins/mod_component.lua @ 11560:3bbb1af92514

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 13 May 2021 11:17:13 +0100
parent 11240:0f7ecc9a4560
parent 11540:1937b3c3efb5
child 11868:ae093c259da2
comparison
equal deleted inserted replaced
11538:30feeb4d9d0b 11560:3bbb1af92514
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 31
31 local sessions = module:shared("sessions"); 32 local sessions = module:shared("sessions");
32 33
33 local function keepalive(event) 34 local function keepalive(event)
34 local session = event.session; 35 local session = event.session;
302 conn:setoption("keepalive", opt_keepalives); 303 conn:setoption("keepalive", opt_keepalives);
303 end 304 end
304 305
305 session.log("info", "Incoming Jabber component connection"); 306 session.log("info", "Incoming Jabber component connection");
306 307
307 local stream = new_xmpp_stream(session, stream_callbacks); 308 local stream = new_xmpp_stream(session, stream_callbacks, stanza_size_limit);
308 session.stream = stream; 309 session.stream = stream;
309 310
310 session.notopen = true; 311 session.notopen = true;
311 312
312 function session.reset_stream() 313 function session.reset_stream()