Commit 9e08be7b authored by Jedrzej Potoniec's avatar Jedrzej Potoniec Committed by Nathaniel Wesley Filardo
Browse files

httpserver: fix memory leak

There was a memory leak related to not dropping all references to
fifosock's ssend.
parent c695a451
......@@ -86,19 +86,22 @@ do
local buf = ""
local method, url
local ondisconnect = function(connection)
connection:on("receive", nil)
connection:on("disconnection", nil)
connection:on("sent", nil)
collectgarbage("collect")
end
local cfini = function()
conn:on("receive", nil)
conn:on("disconnection", nil)
csend(function()
conn:on("sent", nil)
conn:close()
ondisconnect(conn)
end)
end
local ondisconnect = function(connection)
connection:on("sent", nil)
collectgarbage("collect")
end
-- header parser
local cnt_len = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment