mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
net.httpserver: Make request.conn be the server.lua conn instead of the underlying socket (more useful this way)
This commit is contained in:
parent
46e81c8baf
commit
03384d466b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue