diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-12-07 19:26:12 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-12-07 19:26:12 +0000 |
commit | 7afd141b8502a89347d049f9bd9179b2fa2737e5 (patch) | |
tree | 2bb84d5b4a07cadb395869009e94348ab192d7fc | |
parent | c990578ae026a01bb9c1b0b1b0080d5a5ca952fb (diff) | |
download | prosody-7afd141b8502a89347d049f9bd9179b2fa2737e5.tar.gz prosody-7afd141b8502a89347d049f9bd9179b2fa2737e5.zip |
net.server_event: Add setquitting() function to be compatible with net.server_select
-rw-r--r-- | net/server_event.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/server_event.lua b/net/server_event.lua index cefac3c6..1a073586 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -766,6 +766,14 @@ local closeallservers = function( arg ) end end +local function setquitting(yes) + if yes then + -- Quit now + closeallservers(); + base:loopexit(); + end +end + return { cfg = cfg, |