Software /
code /
prosody
Changeset
11266:2115496e8251 0.11
net.adns: Prevent empty packets from being sent on "connect" (fix #1619)
Thanks Ge0rG for testing
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 12 Jan 2021 13:25:08 +0100 |
parents | 11265:957d417eb56e |
children | 11267:97077089f3c2 11306:5798ab735619 |
files | net/adns.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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