mod_s2s: Don't treat a stanza as delivered if session.sends2s() returns false
authorMatthew Wild <mwild1@gmail.com>
Sun, 22 Jul 2012 17:04:02 +0100
changeset 4968 a6d3ac11a7af
parent 4967 b7bcf088e723
child 4969 15183193c6a6
mod_s2s: Don't treat a stanza as delivered if session.sends2s() returns false
plugins/mod_s2s/mod_s2s.lua
--- a/plugins/mod_s2s/mod_s2s.lua	Sun Jul 22 17:02:18 2012 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua	Sun Jul 22 17:04:02 2012 +0100
@@ -97,9 +97,10 @@
 				log("error", "WARNING! This might, possibly, be a bug, but it might not...");
 				log("error", "We are going to send from %s instead of %s", tostring(host.from_host), tostring(from_host));
 			end
-			host.sends2s(stanza);
-			host.log("debug", "stanza sent over "..host.type);
-			return true;
+			if host.sends2s(stanza) then
+				host.log("debug", "stanza sent over "..host.type);
+				return true;
+			end
 		end
 	end
 end