summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main_loop.lua9
1 files changed, 8 insertions, 1 deletions
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