aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/httpserver.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua
index 6ebfcb76..79705e6f 100644
--- a/net/httpserver.lua
+++ b/net/httpserver.lua
@@ -214,7 +214,7 @@ end
function new_request(handler)
- return { handler = handler, conn = handler.socket,
+ return { handler = handler, conn = handler,
write = function (...) return handler:write(...); end, state = "request",
server = http_servers[handler:serverport()],
send = send_response,
@@ -236,7 +236,7 @@ function destroy_request(request)
end
request.handler:close()
if request.conn then
- listener.ondisconnect(request.handler, "closed");
+ listener.ondisconnect(request.conn, "closed");
end
end
end