aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/s2smanager.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 39cce309..8705633d 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -576,6 +576,19 @@ function destroy_session(session, reason)
incoming_s2s[session] = nil;
end
+ local event_data = { session = session, reason = reason };
+ if session.type == "s2sout" then
+ prosody.events.fire_event("s2sout-destroyed", event_data);
+ if hosts[session.from_host] then
+ hosts[session.from_host].events.fire_event("s2sout-destroyed", event_data);
+ end
+ else
+ prosody.events.fire_event("s2sin-destroyed", event_data);
+ if hosts[session.to_host] then
+ hosts[session.to_host].events.fire_event("s2sin-destroyed", event_data);
+ end
+ end
+
retire_session(session); -- Clean session until it is GC'd
end