diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-11-09 20:23:28 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-11-09 20:23:28 +0500 |
commit | f585f295c76b28787e66af111f755424ce4d5650 (patch) | |
tree | ea527d0c6e91b3812145df1bdef2accc5dde5da2 /plugins | |
parent | dbde1c7ea112a2a9284fd90a0010efa5327f8b03 (diff) | |
download | prosody-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.lua | 2 |
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 |