aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s/mod_s2s.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-26 12:25:25 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-26 12:25:25 +0100
commitde337196d4b4952b9da5604d2437782c0372f8dd (patch)
tree60d2de07f0307ab6968d36f1f27f4b938e53dc80 /plugins/mod_s2s/mod_s2s.lua
parent55b90a8abd0e65e476c7df3fe0ff437a99607f3e (diff)
downloadprosody-de337196d4b4952b9da5604d2437782c0372f8dd.tar.gz
prosody-de337196d4b4952b9da5604d2437782c0372f8dd.zip
mod_s2s: Obey tcp_keepalives option for s2s too, and make it individually configurable through s2s_tcp_keepalives (thanks yeled)
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 0ece23a6..a935239e 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -33,7 +33,7 @@ local s2sout = module:require("s2sout");
local connect_timeout = module:get_option_number("s2s_timeout", 90);
local stream_close_timeout = module:get_option_number("s2s_close_timeout", 5);
-
+local opt_keepalives = module:get_option_boolean("s2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
local secure_auth = module:get_option_boolean("s2s_secure_auth", false); -- One day...
local secure_domains, insecure_domains =
module:get_option_set("s2s_secure_domains", {})._items, module:get_option_set("s2s_insecure_domains", {})._items;
@@ -563,6 +563,7 @@ local function initialize_session(session)
end
function listener.onconnect(conn)
+ conn:setoption("keepalive", opt_keepalives);
local session = sessions[conn];
if not session then -- New incoming connection
session = s2s_new_incoming(conn);