aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/adns.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 48b724c0..ae168b9c 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -56,6 +56,11 @@ local function new_async_socket(sock, resolver)
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