Comparison

plugins/mod_s2s/mod_s2s.lua @ 8267:42fad8465537

mod_s2s: Use a separate resolver object for each outgoing session Cleaner approach hopefully fixes problems with some peoples' DNS hanging after a while, failed DNS when a large number of queries are made at once, and source port re-use. Related issues: #487, 761, #991, #992, #1001
author Matthew Wild <mwild1@gmail.com>
date Mon, 25 Sep 2017 23:12:47 +0100
parent 8234:97b3ca502547
child 8268:e21d82551e05
child 8919:c46c2942b8fe
comparison
equal deleted inserted replaced
8266:9a97dd174ec9 8267:42fad8465537
172 end, -1); 172 end, -1);
173 end 173 end
174 174
175 -- Stream is authorised, and ready for normal stanzas 175 -- Stream is authorised, and ready for normal stanzas
176 function mark_connected(session) 176 function mark_connected(session)
177
177 local sendq = session.sendq; 178 local sendq = session.sendq;
178 179
179 local from, to = session.from_host, session.to_host; 180 local from, to = session.from_host, session.to_host;
180 181
181 session.log("info", "%s s2s connection %s->%s complete", session.direction:gsub("^.", string.upper), from, to); 182 session.log("info", "%s s2s connection %s->%s complete", session.direction:gsub("^.", string.upper), from, to);
203 sendq[i] = nil; 204 sendq[i] = nil;
204 end 205 end
205 session.sendq = nil; 206 session.sendq = nil;
206 end 207 end
207 208
209 session.resolver = nil;
208 session.ip_hosts = nil; 210 session.ip_hosts = nil;
209 session.srv_hosts = nil; 211 session.srv_hosts = nil;
210 end 212 end
211 end 213 end
212 214