Software /
code /
prosody
Comparison
net/adns.lua @ 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 |
parent | 8555:4f0f5b49bb03 |
child | 11267:97077089f3c2 |
comparison
equal
deleted
inserted
replaced
11265:957d417eb56e | 11266:2115496e8251 |
---|---|
47 end | 47 end |
48 end | 48 end |
49 handler, err = server.wrapclient(sock, "dns", 53, listener); | 49 handler, err = server.wrapclient(sock, "dns", 53, listener); |
50 if not handler then | 50 if not handler then |
51 return nil, err; | 51 return nil, err; |
52 end | |
53 if handler.set then | |
54 -- server_epoll: only watch for incoming data | |
55 -- avoids sending empty packet on first 'onwritable' event | |
56 handler:set(true, false); | |
52 end | 57 end |
53 | 58 |
54 handler.settimeout = function () end | 59 handler.settimeout = function () end |
55 handler.setsockname = function (_, ...) return sock:setsockname(...); end | 60 handler.setsockname = function (_, ...) return sock:setsockname(...); end |
56 handler.setpeername = function (_, ...) peername = (...); local ret, err = sock:setpeername(...); _:set_send(dummy_send); return ret, err; end | 61 handler.setpeername = function (_, ...) peername = (...); local ret, err = sock:setpeername(...); _:set_send(dummy_send); return ret, err; end |