Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 5281:815c689f85ad
prosody, mod_c2s, mod_s2s: Move closing of c2s and s2s sessions to respective plugins
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 28 Dec 2012 14:33:47 +0100 |
parent | 5274:0d08c0965824 |
child | 5307:d80e56d8805c |
comparison
equal
deleted
inserted
replaced
5280:1514a6147e85 | 5281:815c689f85ad |
---|---|
504 initialize_session(session); | 504 initialize_session(session); |
505 end | 505 end |
506 | 506 |
507 s2sout.set_listener(listener); | 507 s2sout.set_listener(listener); |
508 | 508 |
509 module:hook("server-stopping", function(event) | |
510 local reason = event.reason; | |
511 for _, session in pairs(sessions) do | |
512 session:close{ condition = "system-shutdown", text = reason }; | |
513 end | |
514 end,500); | |
515 | |
516 | |
517 | |
509 module:provides("net", { | 518 module:provides("net", { |
510 name = "s2s"; | 519 name = "s2s"; |
511 listener = listener; | 520 listener = listener; |
512 default_port = 5269; | 521 default_port = 5269; |
513 encryption = "starttls"; | 522 encryption = "starttls"; |