mod_s2s_keepalive/mod_s2s_keepalive.lua
changeset 4297 edde5905744a
parent 4217 93a980ac1816
child 4632 15c4eabdcea0
equal deleted inserted replaced
4296:c13b8003ee5c 4297:edde5905744a
    21 		end
    21 		end
    22 	end
    22 	end
    23 
    23 
    24 	for session in pairs(prosody.incoming_s2s) do
    24 	for session in pairs(prosody.incoming_s2s) do
    25 		if session.type ~= "s2sin_unauthed"
    25 		if session.type ~= "s2sin_unauthed"
       
    26 		and not session.notopen
    26 		and session.to_host == host
    27 		and session.to_host == host
    27 		and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then
    28 		and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then
    28 			if not s2sout[session.from_host] then ping_hosts[session.from_host] = true; end
    29 			if not s2sout[session.from_host] then ping_hosts[session.from_host] = true; end
    29 			session.sends2s " ";
    30 			session.sends2s " ";
    30 			-- If the connection is dead, this should make it time out.
    31 			-- If the connection is dead, this should make it time out.