Comparison

plugins/mod_s2s/mod_s2s.lua @ 6658:65563530375b

mod_s2s: Fire read timeout event on correct virtualhost for incoming connections
author Kim Alvefur <zash@zash.se>
date Wed, 06 May 2015 13:35:34 +0200
parent 6630:6735e2d735d6
child 6666:42fdc8dddf04
child 6685:3f05b255937f
comparison
equal deleted inserted replaced
6657:f1af4edd5722 6658:65563530375b
623 end 623 end
624 end 624 end
625 625
626 function listener.onreadtimeout(conn) 626 function listener.onreadtimeout(conn)
627 local session = sessions[conn]; 627 local session = sessions[conn];
628 local host = session.host or session.to_host;
628 if session then 629 if session then
629 return (hosts[session.host] or prosody).events.fire_event("s2s-read-timeout", { session = session }); 630 return (hosts[host] or prosody).events.fire_event("s2s-read-timeout", { session = session });
630 end 631 end
631 end 632 end
632 633
633 function listener.register_outgoing(conn, session) 634 function listener.register_outgoing(conn, session)
634 sessions[conn] = session; 635 sessions[conn] = session;