aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_c2s.lua
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
commit2e1c23fdc14e1369114d71677f872173e4783598 (patch)
tree0b52a2f20f7d6de9cd3d27a505fff3753976e0ee /plugins/mod_c2s.lua
parent1a98bd392802a1110db235a90ca7e1432bdeb0e0 (diff)
downloadprosody-2e1c23fdc14e1369114d71677f872173e4783598.tar.gz
prosody-2e1c23fdc14e1369114d71677f872173e4783598.zip
mod_c2s: Fix traceback if c2s stream sent to component
Diffstat (limited to 'plugins/mod_c2s.lua')
-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;