function step()
local idle = true
-
if not THREAD_LIMIT or threadc < THREAD_LIMIT then
local now = os.time()
for i, server in ipairs(reading) do
if coroutine.status(thread) == "dead" then
threads[client] = nil
threadc = threadc - 1
+ threadm[client] = nil
+ threadi[client] = nil
elseif threadm[client] and threadm[client] + THREAD_TIMEOUT < now then
threads[client] = nil
threadc = threadc - 1
if idle then
socket.sleep(THREAD_IDLEWAIT)
end
-end
\ No newline at end of file
+end