summaryrefslogtreecommitdiffhomepage
path: root/libs/lucid-http/luasrc/lucid/http
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-07-10 16:39:30 +0000
committerSteven Barth <steven@midlink.org>2009-07-10 16:39:30 +0000
commit7ba12e9c5eafd809237fa69464e8b601926e9513 (patch)
tree1ffb90f2a9e2034ab209953d86f39a88668d91db /libs/lucid-http/luasrc/lucid/http
parent128437f67103c980a8c963bf2510fe38ba1f4e54 (diff)
Move memory limit to lucid, reincrease thread limit
Diffstat (limited to 'libs/lucid-http/luasrc/lucid/http')
-rw-r--r--libs/lucid-http/luasrc/lucid/http/server.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/lucid-http/luasrc/lucid/http/server.lua b/libs/lucid-http/luasrc/lucid/http/server.lua
index 25f2535d99..4bbec31a13 100644
--- a/libs/lucid-http/luasrc/lucid/http/server.lua
+++ b/libs/lucid-http/luasrc/lucid/http/server.lua
@@ -14,6 +14,7 @@ $Id$
local ipairs, pairs = ipairs, pairs
local tostring, tonumber = tostring, tonumber
local pcall, assert, type = pcall, assert, type
+local set_memory_limit = set_memory_limit
local os = require "os"
local nixio = require "nixio"
@@ -408,6 +409,11 @@ function Server.process(self, client, env)
local close = false
local stat, code, msg, message, err
+ env.config.memlimit = tonumber(env.config.memlimit)
+ if env.config.memlimit and set_memory_limit then
+ set_memory_limit(env.config.memlimit)
+ end
+
client:setsockopt("socket", "rcvtimeo", 5)
client:setsockopt("socket", "sndtimeo", 5)