Diff

net/http.lua @ 8535:b6f3b34ecc03

net.http: Rename handler to conn, for consistency with all our other code
author Matthew Wild <mwild1@gmail.com>
date Fri, 23 Feb 2018 16:21:40 +0000
parent 8534:c071cabfa066
child 8551:2bd2e94a0496
line wrap: on
line diff
--- a/net/http.lua	Fri Feb 23 16:20:45 2018 +0000
+++ b/net/http.lua	Fri Feb 23 16:21:40 2018 +0000
@@ -222,13 +222,13 @@
 		sslctx = ex and ex.sslctx or self.options and self.options.sslctx;
 	end
 
-	local handler, ret = server.addclient(host, port_number, listener, "*a", sslctx)
-	if not handler then
+	local conn, ret = server.addclient(host, port_number, listener, "*a", sslctx)
+	if not conn then
 		self.events.fire_event("request-connection-error", { http = self, request = req, url = u, err = ret });
 		callback(ret, 0, req);
 		return nil, ret;
 	end
-	req.conn = handler
+	req.conn = conn
 	req.write = function (...) return req.conn:write(...); end
 
 	req.callback = function (content, code, response, request)