From 2e0dff9f57279f37a5633396f5971c016d5fd8bf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 25 Sep 2015 17:32:13 +0200 Subject: net.dns: Use new IPv4-specific socket factory if available (fixes dns on libevent with latest development version of luasocket) --- net/dns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/dns.lua b/net/dns.lua index acc1556c..80bd895c 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -620,7 +620,7 @@ function resolver:getsocket(servernum) -- - - - - - - - - - - - - getsocket if peer:find(":") then sock, err = socket.udp6(); else - sock, err = socket.udp(); + sock, err = (socket.udp4 or socket.udp)(); end if sock and self.socket_wrapper then sock, err = self.socket_wrapper(sock, self); end if not sock then -- cgit v1.2.3