From 3d917850180f67adc7f2c6b5d00f27c152e7194c Mon Sep 17 00:00:00 2001 From: Edvinas Date: Sun, 23 Feb 2020 19:46:35 +0200 Subject: [PATCH] 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. --- lua_modules/http/httpserver.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua_modules/http/httpserver.lua b/lua_modules/http/httpserver.lua index ba269603..f2e0c48c 100644 --- a/lua_modules/http/httpserver.lua +++ b/lua_modules/http/httpserver.lua @@ -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