Software /
code /
prosody-modules
Comparison
mod_s2s_keepalive/mod_s2s_keepalive.lua @ 1264:2db2c03dfb95
mod_s2s_keepalive: Don't send directly on the connection, use sends2s
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 Jan 2014 20:01:11 +0100 |
parent | 1110:97e238ce37ce |
child | 3723:427879b46061 |
comparison
equal
deleted
inserted
replaced
1263:fe29627a5ed8 | 1264:2db2c03dfb95 |
---|---|
17 end | 17 end |
18 | 18 |
19 for session in pairs(prosody.incoming_s2s) do | 19 for session in pairs(prosody.incoming_s2s) do |
20 if session.type == "s2sin" -- as opposed to _unauthed | 20 if session.type == "s2sin" -- as opposed to _unauthed |
21 and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then | 21 and (not(keepalive_servers) or keepalive_servers:contains(session.from_host)) then |
22 session.conn:send " "; | 22 session.sends2s " "; |
23 -- If the connection is dead, this should make it time out. | 23 -- If the connection is dead, this should make it time out. |
24 end | 24 end |
25 end | 25 end |
26 return keepalive_interval; | 26 return keepalive_interval; |
27 end | 27 end |