Skip to content

Commit 3d91785

Browse files
authored
Bugfix conn metatable method call (#3012)
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.
1 parent 71a182c commit 3d91785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua_modules/http/httpserver.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ do
8989
local buf = ""
9090
local method, url
9191
local ondisconnect = function(conn)
92-
conn.on("sent", nil)
92+
conn:on("sent", nil)
9393
collectgarbage("collect")
9494
end
9595
-- header parser

0 commit comments

Comments
 (0)