diff options
| author | Steven Barth <steven@midlink.org> | 2008-11-01 10:53:51 +0000 |
|---|---|---|
| committer | Steven Barth <steven@midlink.org> | 2008-11-01 10:53:51 +0000 |
| commit | ea1346519acadbb3dcadf3cf0a19eef575ad083a (patch) | |
| tree | c55f4f8f32dcbfc9eb2f0a83246f0f972911521e /libs | |
| parent | 9fb0f37769d7d7116995fa3769c1097e5a1bbfef (diff) | |
Remove overload protection from SDK httpd
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/httpd/luasrc/httpd/handler/luci.lua | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libs/httpd/luasrc/httpd/handler/luci.lua b/libs/httpd/luasrc/httpd/handler/luci.lua index 6e9c6778da..8ccf7c86fa 100644 --- a/libs/httpd/luasrc/httpd/handler/luci.lua +++ b/libs/httpd/luasrc/httpd/handler/luci.lua @@ -40,31 +40,6 @@ function Luci.handle_post(self, ...) end function Luci.handle_get(self, request, sourcein, sinkerr) - local reaped = false - local running = 0 - - for _, v in pairs(self.running) do - if v then running = running + 1 end - end - - if self.limit and running >= self.limit then - for k, v in ipairs(self.running) do - if coroutine.status(k) == "dead" then - self.running[k] = nil - running = running - 1 - reaped = true - end - end - - if reaped then collectgarbage() end - - if running >= self.limit then - return self:failure(503, "Overload %i/%i" % { running, self.limit } ) - end - end - - self.running[coroutine.running()] = true - local r = luci.http.Request( request.env, sourcein, |
