aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-05-10 02:12:51 +0200
committerKim Alvefur <zash@zash.se>2014-05-10 02:12:51 +0200
commit57940a83511102277a9c6573656618b1bfe552d2 (patch)
tree0b52a2f20f7d6de9cd3d27a505fff3753976e0ee
parenteeacb3cb6ff5510cb5af8ea2c622783562ced91c (diff)
downloadprosody-57940a83511102277a9c6573656618b1bfe552d2.tar.gz
prosody-57940a83511102277a9c6573656618b1bfe552d2.zip
mod_c2s: Fix traceback if c2s stream sent to component
-rw-r--r--plugins/mod_c2s.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index b2a81592..5feb1f2c 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -50,7 +50,7 @@ function stream_callbacks.streamopened(session, attr)
session.streamid = uuid_generate();
(session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host);
- if not hosts[session.host] then
+ if not hosts[session.host] or not hosts[session.host].users then
-- We don't serve this host...
session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)};
return;