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 | f4690a6063ec7940ef304691906fdfdebb57eab6 (patch) | |
tree | 1b740492720e5c386b928514e711e90e705f5693 /plugins/mod_component.lua | |
parent | 0e971a43895405f996ea49fc70142ec9ba182cc1 (diff) | |
parent | cd10e4439e1c9b6209f87bb6c77e51fb2f7992fc (diff) | |
download | prosody-f4690a6063ec7940ef304691906fdfdebb57eab6.tar.gz prosody-f4690a6063ec7940ef304691906fdfdebb57eab6.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 |