Changeset

13111:8576f94ac90a

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 24 May 2023 15:35:28 +0200
parents 13109:5469045ef7f0 (current diff) 13110:d5f322dd424b (diff)
children 13112:b6aaab0846fe
files core/features.lua plugins/mod_s2s.lua
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/features.lua	Wed May 24 14:56:50 2023 +0200
+++ b/core/features.lua	Wed May 24 15:35:28 2023 +0200
@@ -10,5 +10,7 @@
 		"loader";
 		-- "keyval+" store
 		"keyval+";
+
+		"s2sout-pre-connect-event";
 	};
 };
--- a/plugins/mod_s2s.lua	Wed May 24 14:56:50 2023 +0200
+++ b/plugins/mod_s2s.lua	Wed May 24 15:35:28 2023 +0200
@@ -226,6 +226,10 @@
 			resolver;
 		});
 	end
+
+	local pre_event = { session = host_session; resolver = resolver };
+	module:context(from_host):fire_event("s2sout-pre-connect", pre_event);
+	resolver = pre_event.resolver;
 	connect(resolver, listener, nil, { session = host_session });
 	m_initiated_connections:with_labels(from_host):add(1)
 	return true;