diff options
author | Kim Alvefur <zash@zash.se> | 2012-12-28 15:14:11 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-12-28 15:14:11 +0100 |
commit | 18d85d2a745f67eb48fdf20328e81857e04c6261 (patch) | |
tree | 0203d6bd6df69296fe7defc78a44293a3e08767d /plugins/mod_s2s/mod_s2s.lua | |
parent | 61201a751bacfdfc9e019d9801750be70cf79f46 (diff) | |
parent | 4f4bc7973a3f9f754b4576403b9da8d304472055 (diff) | |
download | prosody-18d85d2a745f67eb48fdf20328e81857e04c6261.tar.gz prosody-18d85d2a745f67eb48fdf20328e81857e04c6261.zip |
Merge 0.9->trunk
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 788a64af..ad628a9b 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -506,6 +506,15 @@ end s2sout.set_listener(listener); +module:hook("server-stopping", function(event) + local reason = event.reason; + for _, session in pairs(sessions) do + session:close{ condition = "system-shutdown", text = reason }; + end +end,500); + + + module:provides("net", { name = "s2s"; listener = listener; |