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
commitd0e66328f95dc2635ddb1892b815c54254c3f05f (patch)
tree0b52a2f20f7d6de9cd3d27a505fff3753976e0ee
parent335280f51d99e8c62315b92907516b58a1bfb9d0 (diff)
downloadprosody-d0e66328f95dc2635ddb1892b815c54254c3f05f.tar.gz
prosody-d0e66328f95dc2635ddb1892b815c54254c3f05f.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;