# HG changeset patch # User Kim Alvefur # Date 1610454308 -3600 # Node ID 2115496e82517b38ef411dab056e6bf9ce1715d1 # Parent 957d417eb56e354b27c4a671a25ae0ddff583a09 net.adns: Prevent empty packets from being sent on "connect" (fix #1619) Thanks Ge0rG for testing diff -r 957d417eb56e -r 2115496e8251 net/adns.lua --- a/net/adns.lua Sun Jan 10 14:54:03 2021 +0100 +++ b/net/adns.lua Tue Jan 12 13:25:08 2021 +0100 @@ -50,6 +50,11 @@ 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