I'm writing a module and it has local table with a list of filtered clients. When one of clients in table is killed all operations with it raise "client is invalid" exception.

So how can I check if client is killed?

有帮助吗?

解决方案

Best would be to add a signal for the unmanage event on every client, you add to your list. In the signal function you can then delete the client from the list of tables. It could look something like this:

client.add_signal('unmanage', function(c)
    -- Remove c from your list
end)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top