Changeset

6857:86fcc3fa1a97

net.dns: Use new IPv4-specific socket factory if available (fixes dns on libevent with latest development version of luasocket)
author Kim Alvefur <zash@zash.se>
date Fri, 25 Sep 2015 17:32:13 +0200
parents 6856:489f4ae291bf
children 6858:d8f8c0b2fda8
files net/dns.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/dns.lua	Fri Sep 25 17:26:47 2015 +0200
+++ b/net/dns.lua	Fri Sep 25 17:32:13 2015 +0200
@@ -620,7 +620,7 @@
 	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