Changeset

11267:97077089f3c2

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 12 Jan 2021 19:19:15 +0100
parents 11264:2cdcf55c6dd5 (current diff) 11266:2115496e8251 (diff)
children 11268:e3f6f0b39e7b
files net/adns.lua net/server_epoll.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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