# HG changeset patch # User Kim Alvefur # Date 1470595717 -7200 # Node ID a0813737c6fa8ad48d2f5720f3fb04d56f9df008 # Parent 4ef37ac695625f94125115c77a24198467184cb6 mod_s2s: Index session after checking if it exists (fixes traceback in case of a connection without a session having a read timeout) diff -r 4ef37ac69562 -r a0813737c6fa plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Fri Jul 29 13:20:02 2016 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Sun Aug 07 20:48:37 2016 +0200 @@ -642,8 +642,8 @@ function listener.onreadtimeout(conn) local session = sessions[conn]; - local host = session.host or session.to_host; if session then + local host = session.host or session.to_host; return (hosts[host] or prosody).events.fire_event("s2s-read-timeout", { session = session }); end end