Software /
code /
prosody
Diff
plugins/mod_c2s.lua @ 6279:16d5b55c8d8d
mod_c2s: Fix traceback if c2s stream sent to component
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 May 2014 02:12:51 +0200 |
parent | 5757:b5ba004beb0a |
child | 6284:b49540983320 |
child | 6364:4e93e8768c36 |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Fri May 09 19:59:49 2014 +0200 +++ b/plugins/mod_c2s.lua Sat May 10 02:12:51 2014 +0200 @@ -50,7 +50,7 @@ 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;