aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-11-09 20:23:28 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-11-09 20:23:28 +0500
commitf585f295c76b28787e66af111f755424ce4d5650 (patch)
treeea527d0c6e91b3812145df1bdef2accc5dde5da2 /plugins
parentdbde1c7ea112a2a9284fd90a0010efa5327f8b03 (diff)
downloadprosody-f585f295c76b28787e66af111f755424ce4d5650.tar.gz
prosody-f585f295c76b28787e66af111f755424ce4d5650.zip
mod_component: Send back a <conflict/> stream error when multiple sessions attempt to bind.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_component.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 1de576a0..996a983e 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -69,6 +69,8 @@ function handle_component_auth(event)
log("info", "Component successfully registered");
else
log("error", "Multiple components bound to the same address, first one wins (TODO: Implement stanza distribution)");
+ session:close{ condition = "conflict", text = "Component already connected" };
+ return true;
end
-- Signal successful authentication