aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s/mod_s2s.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-08-27 13:40:10 +0100
committerMatthew Wild <mwild1@gmail.com>2016-08-27 13:40:10 +0100
commitf6fd68b0dd80dc3f225b7e1ee710ecf369f8f283 (patch)
treea525dfe0067f9d6df8b5fa5f9891487f92fd660a /plugins/mod_s2s/mod_s2s.lua
parenta206b98c0ebebc15626b55c83e66e64cfab7c673 (diff)
downloadprosody-f6fd68b0dd80dc3f225b7e1ee710ecf369f8f283.tar.gz
prosody-f6fd68b0dd80dc3f225b7e1ee710ecf369f8f283.zip
mod_s2s: Fire event when s2s connection fails
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index ae9a746a..d6a82d40 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -634,6 +634,7 @@ function listener.ondisconnect(conn, err)
if s2sout.attempt_connection(session, err) then
return; -- Session lives for now
end
+ hosts[session.from_host].events.fire_event("s2s-connect-failure", { session = session, err = err });
end
(session.log or log)("debug", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err or "connection closed"));
s2s_destroy_session(session, err);