skynet.kill would raise error

This commit is contained in:
Cloud Wu
2015-02-05 18:25:06 +08:00
parent 7c7d63ea70
commit 72c2fad82a
2 changed files with 4 additions and 4 deletions

View File

@@ -53,12 +53,12 @@ function command.GC()
return command.MEM()
end
function command.REMOVE(_, handle)
function command.REMOVE(_, handle, kill)
services[handle] = nil
local response = instance[handle]
if response then
-- instance is dead
response(true) -- return nil to caller of newservice
response(not kill) -- return nil to caller of newservice, when kill == false
instance[handle] = nil
end