aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 4341ffb5..d1876b0f 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -49,7 +49,9 @@ function new_async_socket(sock, resolver)
local listener = {};
local handler = {};
function listener.onincoming(conn, data)
- dns.feed(handler, data);
+ if data then
+ dns.feed(handler, data);
+ end
end
function listener.ondisconnect(conn, err)
log("warn", "DNS socket for %s disconnected: %s", peername, err);