aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 560e4b53..0bdf6ee3 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -50,6 +50,11 @@ local function new_async_socket(sock, resolver)
if not handler then
return nil, err;
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