Browse Source

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.
Edvinas 4 years ago
parent
commit
3d91785018
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lua_modules/http/httpserver.lua

+ 1 - 1
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