Diff

plugins/mod_s2s/mod_s2s.lua @ 6666:42fdc8dddf04

Merge 0.10->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:26:53 +0100
parent 6633:832987170da8
parent 6658:65563530375b
child 6690:b2e89583d6e6
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua	Tue May 05 01:34:20 2015 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Wed May 06 19:26:53 2015 +0100
@@ -628,8 +628,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