net/adns.lua
changeset 11271 97077089f3c2
parent 11221 65ce1178d655
parent 11270 2115496e8251
child 12978 ba409c67353b
--- a/net/adns.lua	Fri Jan 08 23:56:27 2021 +0100
+++ b/net/adns.lua	Tue Jan 12 19:19:15 2021 +0100
@@ -56,6 +56,11 @@
 			return nil, err;
 		end
 	end
+	if handler.set then
+		-- server_epoll: only watch for incoming data
+		-- avoids sending empty packet on first 'onwritable' event
+		handler:set(true, false);
+	end
 
 	handler.settimeout = function () end
 	handler.setsockname = function (_, ...) return sock:setsockname(...); end