--- a/core/s2smanager.lua Thu Sep 02 23:09:49 2010 +0200
+++ b/core/s2smanager.lua Sun Sep 05 12:13:49 2010 +0100
@@ -576,6 +576,19 @@
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