From 8e3ffe3dab383df7c2307a8fc55e0d856fd3a252 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 22 Nov 2010 22:25:06 +0000 Subject: mainloop now handles all return codes for writer as well git-svn-id: https://svn.spreadspace.org/gcsd/trunk@55 ac14a137-c7f1-4531-abe0-07747231d213 --- src/main_loop.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main_loop.lua b/src/main_loop.lua index 9b9d535..3211660 100644 --- a/src/main_loop.lua +++ b/src/main_loop.lua @@ -118,7 +118,14 @@ function main_loop(opt) end for _, writer in ipairs(writeable) do ret = writer:write() - if(ret == defines.KILL_CLIENT) then + if(ret == defines.KILL_DAEMON) then + return_value = 2 + break + elseif(ret == defines.KILL_MODULE_CLASS) then + module_list:unregister_by_class(writer.client_instance.module_instance.class) + elseif(ret == defines.KILL_MODULE) then + module_list:unregister(writer.client_instance.module_instance) + elseif(ret == defines.KILL_CLIENT) then client_list:unregister(writer.client_instance) end end -- cgit v1.2.3