changeset 14027:4a288b082f42 13.0

mod_s2s: Fix traceback when outgoing s2s queue is full (thanks tom) When session.send() is used, no 'origin' field is included in the event, leading to an error attempting to index nil.
author Kim Alvefur <zash@zash.se>
date Sun, 04 Jan 2026 17:54:48 +0100
parents 8a9c1bc37ebc
children 04d7f2038933
files plugins/mod_s2s.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_s2s.lua	Mon Jan 05 12:34:37 2026 +0000
+++ b/plugins/mod_s2s.lua	Sun Jan 04 17:54:48 2026 +0100
@@ -201,6 +201,7 @@
 		end
 		if not host.sendq:push(st.clone(stanza)) then
 			host.log("warn", "stanza [%s] not queued ", stanza.name);
+			if not event.origin then return false; end
 			event.origin.send(st.error_reply(stanza, "wait", "resource-constraint", "Outgoing stanza queue full"));
 			return true;
 		end