summaryrefslogtreecommitdiffhomepage
path: root/libs/httpd/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-07-01 18:05:48 +0000
committerSteven Barth <steven@midlink.org>2008-07-01 18:05:48 +0000
commita6619a5cb7a05e1e8c761b27f28ec2c5e791020a (patch)
tree67d420d95b2753d1034b2fa80c9df95f3b997442 /libs/httpd/luasrc
parentf3cce185477d504675de82d9f0957b4c0c2e6ddc (diff)
* libs/httpd: Fixed a memleak
Diffstat (limited to 'libs/httpd/luasrc')
-rw-r--r--libs/httpd/luasrc/httpd.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/httpd/luasrc/httpd.lua b/libs/httpd/luasrc/httpd.lua
index 8b54f0e64..9263dcc6d 100644
--- a/libs/httpd/luasrc/httpd.lua
+++ b/libs/httpd/luasrc/httpd.lua
@@ -87,7 +87,6 @@ end
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
@@ -106,6 +105,8 @@ function step()
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
@@ -119,4 +120,4 @@ function step()
if idle then
socket.sleep(THREAD_IDLEWAIT)
end
-end \ No newline at end of file
+end