mod_s2s_keepalive/mod_s2s_keepalive.lua
changeset 3776 22f02716819f
parent 3775 98e1e3ce307d
child 3837 580862decd77
equal deleted inserted replaced
3775:98e1e3ce307d 3776:22f02716819f
    20 		end
    20 		end
    21 	end
    21 	end
    22 
    22 
    23 	for session in pairs(prosody.incoming_s2s) do
    23 	for session in pairs(prosody.incoming_s2s) do
    24 		if session.type ~= "s2sin_unauthed"
    24 		if session.type ~= "s2sin_unauthed"
       
    25 		and session.to_host == host
    25 		and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then
    26 		and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then
    26 			if not s2sout[session.from_host] then ping_hosts[session.from_host] = true; end
    27 			if not s2sout[session.from_host] then ping_hosts[session.from_host] = true; end
    27 			session.sends2s " ";
    28 			session.sends2s " ";
    28 			-- If the connection is dead, this should make it time out.
    29 			-- If the connection is dead, this should make it time out.
    29 		end
    30 		end