mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
net.httpserver, net.http: Update for new net.server API (untested)
This commit is contained in:
parent
31dd611284
commit
54d5d4f69d
2 changed files with 4 additions and 4 deletions
|
@ -209,7 +209,7 @@ end
|
|||
|
||||
function new_request(handler)
|
||||
return { handler = handler, conn = handler.socket,
|
||||
write = handler.write, state = "request",
|
||||
write = function (...) return handler:write(...); end, state = "request",
|
||||
server = http_servers[handler.serverport()],
|
||||
send = send_response,
|
||||
destroy = destroy_request,
|
||||
|
@ -230,7 +230,7 @@ function destroy_request(request)
|
|||
end
|
||||
request.handler.close()
|
||||
if request.conn then
|
||||
listener.disconnect(request.handler, "closed");
|
||||
listener.ondisconnect(request.handler, "closed");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue