From 56a86c2661f1b83ae448399ad62a6c5e69a3ab66 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. nwf edited in light of bcb669a4a0a49e857186093eb79b6f27a3158ad7 --- 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 bce4dfb8..7a5f07be 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(connection) - connection.on("sent", nil) + connection:on("sent", nil) collectgarbage("collect") end -- header parser