Diff

plugins/mod_s2s/mod_s2s.lua @ 4968:a6d3ac11a7af

mod_s2s: Don't treat a stanza as delivered if session.sends2s() returns false
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Jul 2012 17:04:02 +0100
parent 4960:8950510ddb2e
child 4969:15183193c6a6
line wrap: on
line diff
--- 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