Software /
code /
prosody
Changeset
5954:6dc73be95213
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 18 Dec 2013 18:36:54 +0100 |
parents | 5950:bd1d1c29a7e7 (current diff) 5953:1c08d6cca552 (diff) |
children | 5955:b3d5aa57c454 5968:e1e9f1411442 5978:d21ea6001bba |
files | plugins/mod_component.lua |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_component.lua Mon Dec 16 23:32:11 2013 +0000 +++ b/plugins/mod_component.lua Wed Dec 18 18:36:54 2013 +0100 @@ -25,6 +25,8 @@ local log = module._log; +local opt_keepalives = module:get_option_boolean("component_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true)); + local sessions = module:shared("sessions"); function module.add_host(module) @@ -86,7 +88,7 @@ return true; end - module:hook("stanza/jabber:component:accept:handshake", handle_component_auth); + module:hook("stanza/jabber:component:accept:handshake", handle_component_auth, -1); -- Handle stanzas addressed to this component local function handle_stanza(event) @@ -270,6 +272,10 @@ session.log = logger.init(conn_name); session.close = session_close; + if opt_keepalives then + conn:setoption("keepalive", opt_keepalives); + end + session.log("info", "Incoming Jabber component connection"); local stream = new_xmpp_stream(session, stream_callbacks);