Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Tue May 05 12:21:32 2015 +0200 +++ b/plugins/mod_s2s/mod_s2s.lua Wed May 06 13:35:34 2015 +0200 @@ -625,8 +625,9 @@ function listener.onreadtimeout(conn) local session = sessions[conn]; + local host = session.host or session.to_host; if session then - return (hosts[session.host] or prosody).events.fire_event("s2s-read-timeout", { session = session }); + return (hosts[host] or prosody).events.fire_event("s2s-read-timeout", { session = session }); end end