Back out c8aa66595072: Extra changes accidentally included
authorKim Alvefur <zash@zash.se>
Sun, 17 Nov 2019 23:45:44 +0100
changeset 10423 3b9d17c234df
parent 10422 c8aa66595072
child 10424 49a828819696
Back out c8aa66595072: Extra changes accidentally included
net/server_epoll.lua
--- a/net/server_epoll.lua	Sun Nov 17 23:27:48 2019 +0100
+++ b/net/server_epoll.lua	Sun Nov 17 23:45:44 2019 +0100
@@ -383,7 +383,7 @@
 		end
 		if err ~= "timeout" then
 			self:on("disconnect", err);
-			self:close()
+			self:destroy()
 			return;
 		end
 	end
@@ -802,8 +802,7 @@
 		end;
 		-- Otherwise it'll need to be something LuaSocket-compatible
 	end
-	conn.id = new_id();
-	conn.log = logger.init(("fdwatch%s"):format(conn.id));
+	conn.log = logger.init(("fdwatch%s"):format(new_id()));
 	conn:add(onreadable, onwritable);
 	return conn;
 end;
@@ -912,8 +911,7 @@
 				fds[fd] = nil;
 			end;
 		}, interface_mt);
-		conn.id = conn:getfd();
-		conn.log = logger.init(("fdwatch%d"):format(conn.id));
+		conn.log = logger.init(("fdwatch%d"):format(conn:getfd()));
 		local ok, err = conn:add(mode == "r" or mode == "rw", mode == "w" or mode == "rw");
 		if not ok then return ok, err; end
 		return conn;