plugins/mod_proxy65.lua
changeset 9646 e31053344231
parent 6951 e6968e47826d
child 9647 bb8486491b48
--- a/plugins/mod_proxy65.lua	Wed Oct 24 17:13:49 2018 +0200
+++ b/plugins/mod_proxy65.lua	Sun Nov 25 13:14:05 2018 +0100
@@ -121,6 +121,12 @@
 			return true;
 		end
 
+		if not proxy_port then
+			module:log("warn", "Not listening on any port");
+			origin.send(st.error_reply(stanza, "wait", "item-not-found", "Not listening on any port"));
+			return true;
+		end
+
 		local sid = stanza.tags[1].attr.sid;
 		origin.send(st.reply(stanza):tag("query", {xmlns="http://jabber.org/protocol/bytestreams", sid=sid})
 			:tag("streamhost", {jid=host, host=proxy_address, port=proxy_port}));