Changeset

5523:8741bb69a786

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 26 Apr 2013 12:25:53 +0100
parents 5521:076534a0384a (current diff) 5522:3912c9264ef0 (diff)
children 5525:8e41b127e44e
files
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua	Thu Apr 25 20:37:51 2013 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua	Fri Apr 26 12:25:53 2013 +0100
@@ -33,7 +33,7 @@
 
 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 @@
 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);