diff options
author | Matthew Wild <mwild1@gmail.com> | 2016-09-12 22:31:25 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2016-09-12 22:31:25 +0100 |
commit | fa1559e19cb42b43dac7b27213639071cd257462 (patch) | |
tree | 1b740492720e5c386b928514e711e90e705f5693 /plugins/mod_component.lua | |
parent | 804406e5f8ae306cbb5770c38720c09cbb6c43c1 (diff) | |
parent | f04d5613829f64ceed87e0652fcbcd6f602833d3 (diff) | |
download | prosody-fa1559e19cb42b43dac7b27213639071cd257462.tar.gz prosody-fa1559e19cb42b43dac7b27213639071cd257462.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_component.lua')
-rw-r--r-- | plugins/mod_component.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua index 340faec0..2ef2533b 100644 --- a/plugins/mod_component.lua +++ b/plugins/mod_component.lua @@ -314,7 +314,9 @@ function listener.ondisconnect(conn, err) local session = sessions[conn]; if session then (session.log or log)("info", "component disconnected: %s (%s)", tostring(session.host), tostring(err)); - module:fire_event("component-disconnected", { session = session, reason = err }); + if session.host then + module:context(session.host):fire_event("component-disconnected", { session = session, reason = err }); + end if session.on_destroy then session:on_destroy(err); end sessions[conn] = nil; for k in pairs(session) do |