* libs/httpd: Fixed a memleak
This commit is contained in:
parent
f3cce18547
commit
a6619a5cb7
1 changed files with 3 additions and 2 deletions
|
@ -87,7 +87,6 @@ end
|
||||||
|
|
||||||
function step()
|
function step()
|
||||||
local idle = true
|
local idle = true
|
||||||
|
|
||||||
if not THREAD_LIMIT or threadc < THREAD_LIMIT then
|
if not THREAD_LIMIT or threadc < THREAD_LIMIT then
|
||||||
local now = os.time()
|
local now = os.time()
|
||||||
for i, server in ipairs(reading) do
|
for i, server in ipairs(reading) do
|
||||||
|
@ -106,6 +105,8 @@ function step()
|
||||||
if coroutine.status(thread) == "dead" then
|
if coroutine.status(thread) == "dead" then
|
||||||
threads[client] = nil
|
threads[client] = nil
|
||||||
threadc = threadc - 1
|
threadc = threadc - 1
|
||||||
|
threadm[client] = nil
|
||||||
|
threadi[client] = nil
|
||||||
elseif threadm[client] and threadm[client] + THREAD_TIMEOUT < now then
|
elseif threadm[client] and threadm[client] + THREAD_TIMEOUT < now then
|
||||||
threads[client] = nil
|
threads[client] = nil
|
||||||
threadc = threadc - 1
|
threadc = threadc - 1
|
||||||
|
|
Loading…
Reference in a new issue