Skip to content

Commit

Permalink
Bugfix conn metatable method call (#3012)
Browse files Browse the repository at this point in the history
Here `conn` is net.socket instance, so it should be called as one.
Otherwise request is very likely to end up with crash and PANIC.
  • Loading branch information
edzius authored Feb 23, 2020
1 parent 71a182c commit 3d91785
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua_modules/http/httpserver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ do
local buf = ""
local method, url
local ondisconnect = function(conn)
conn.on("sent", nil)
conn:on("sent", nil)
collectgarbage("collect")
end
-- header parser
Expand Down

0 comments on commit 3d91785

Please sign in to comment.