Comparison

plugins/mod_s2s/mod_s2s.lua @ 5713:5cf6dedf36f4

mod_s2s: Add missing global hook for read-timeout
author Kim Alvefur <zash@zash.se>
date Wed, 26 Jun 2013 13:35:38 +0200
parent 5669:9345c161481f
child 5764:969e0a054795
comparison
equal deleted inserted replaced
5712:177fe6978ba8 5713:5cf6dedf36f4
137 137
138 local function keepalive(event) 138 local function keepalive(event)
139 return event.session.sends2s(' '); 139 return event.session.sends2s(' ');
140 end 140 end
141 141
142 module:hook("s2s-read-timeout", keepalive, -1);
143
142 function module.add_host(module) 144 function module.add_host(module)
143 if module:get_option_boolean("disallow_s2s", false) then 145 if module:get_option_boolean("disallow_s2s", false) then
144 module:log("warn", "The 'disallow_s2s' config option is deprecated, please see http://prosody.im/doc/s2s#disabling"); 146 module:log("warn", "The 'disallow_s2s' config option is deprecated, please see http://prosody.im/doc/s2s#disabling");
145 return nil, "This host has disallow_s2s set"; 147 return nil, "This host has disallow_s2s set";
146 end 148 end