Changeset

11900:60676b607b6d

s2smanager: Fire s2s-destroyed event to mirror s2s-created The existing events do not fire for unauthed sessions, for example (because the type does not match). I deemed changing their behaviour too risky, and the current behaviour may even be more desirable for some uses. This means we now have roughly paired events: - s2s-created -> s2s-destroyed (global only) - s2sin-established -> s2sin-destroyed (global + host) - s2sout-established -> s2sout-destroyed (global + host)
author Matthew Wild <mwild1@gmail.com>
date Fri, 12 Nov 2021 13:30:39 +0000
parents 11899:6d06068363aa
children 11901:26406ce35e20
files core/s2smanager.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/s2smanager.lua	Fri Nov 12 13:26:05 2021 +0000
+++ b/core/s2smanager.lua	Fri Nov 12 13:30:39 2021 +0000
@@ -101,6 +101,7 @@
 	end
 
 	local event_data = { session = session, reason = reason };
+	fire_event("s2s-destroyed", event_data);
 	if session.type == "s2sout" then
 		fire_event("s2sout-destroyed", event_data);
 		if hosts[session.from_host] then