diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-07 20:48:37 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-07 20:48:37 +0200 |
commit | abb6df1c2b4cfbfd936450ba892ad0c9ef688012 (patch) | |
tree | 943f7be7ef580ddd86a50ff131cba8e35f656f62 /plugins/mod_s2s/mod_s2s.lua | |
parent | 1eb4ec4922c25d0446cbdca54353085b094585e6 (diff) | |
download | prosody-abb6df1c2b4cfbfd936450ba892ad0c9ef688012.tar.gz prosody-abb6df1c2b4cfbfd936450ba892ad0c9ef688012.zip |
mod_s2s: Index session after checking if it exists (fixes traceback in case of a connection without a session having a read timeout)
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index ea186cf0..ae9a746a 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -642,8 +642,8 @@ end 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 |