Changeset

2335:060fb67cefd5

net.server_event: Add setquitting() function to be compatible with net.server_select
author Matthew Wild <mwild1@gmail.com>
date Mon, 07 Dec 2009 19:26:12 +0000
parents 2334:4cedfeeaaed4
children 2336:fb1d9d2444df
files net/server_event.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Mon Dec 07 19:25:16 2009 +0000
+++ b/net/server_event.lua	Mon Dec 07 19:26:12 2009 +0000
@@ -766,6 +766,14 @@
 	end
 end
 
+local function setquitting(yes)
+	if yes then
+		 -- Quit now
+		 closeallservers();
+		 base:loopexit();
+	end
+end
+
 return {
 
 	cfg = cfg,