Comparison

plugins/mod_s2s/mod_s2s.lua @ 11226:b3ae48362f78 0.11

mod_s2s: Prevent whitespace keepalives the stream has been opened This will result in the stream timing out instead, which is probably correct if the stream has not been opened yet. This was already done for c2s in e69df8093387 Thanks Ge0rG
author Kim Alvefur <zash@zash.se>
date Thu, 10 Dec 2020 11:53:10 +0100
parent 11118:ece430d49809
child 11237:49aeae836ad1
comparison
equal deleted inserted replaced
11213:992c4498a1e3 11226:b3ae48362f78
161 end 161 end
162 return true; 162 return true;
163 end 163 end
164 164
165 local function keepalive(event) 165 local function keepalive(event)
166 return event.session.sends2s(' '); 166 local session = event.session;
167 if not session.notopen then
168 return event.session.send(' ');
169 end
167 end 170 end
168 171
169 module:hook("s2s-read-timeout", keepalive, -1); 172 module:hook("s2s-read-timeout", keepalive, -1);
170 173
171 function module.add_host(module) 174 function module.add_host(module)