Remove overload protection from SDK httpd
[project/luci.git] / libs / httpd / luasrc / httpd / handler / luci.lua
index c3720ff..8ccf7c8 100644 (file)
@@ -27,7 +27,7 @@ function Luci.__init__(self, limit)
        luci.httpd.module.Handler.__init__(self)
        self.limit = limit or 5
        self.running = {}
-       setmetatable(self.running, {__mode = "v"})
+       setmetatable(self.running, {__mode = "k"})
 end
 
 function Luci.handle_head(self, ...)
@@ -40,19 +40,6 @@ function Luci.handle_post(self, ...)
 end
 
 function Luci.handle_get(self, request, sourcein, sinkerr)
-       if self.limit and #self.running >= self.limit then
-               for k, v in ipairs(self.running) do
-                       if coroutine.status(v) == "dead" then
-                               collectgarbage()
-                               break
-                       end
-               end
-               if #self.running >= self.limit then     
-                       return self:failure(503, "Overload")
-               end
-       end
-       table.insert(self.running, coroutine.running())
-       
        local r = luci.http.Request(
                request.env,
                sourcein,