mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix a bug that prevented us from configuring IPv6 nameservers.
This commit is contained in:
parent
57ddda7845
commit
74760f1864
2
evdns.c
2
evdns.c
@ -2393,7 +2393,7 @@ _evdns_nameserver_add_impl(struct evdns_base *base, const struct sockaddr *addre
|
||||
|
||||
evtimer_assign(&ns->timeout_event, ns->base->event_base, nameserver_prod_callback, ns);
|
||||
|
||||
ns->socket = socket(PF_INET, SOCK_DGRAM, 0);
|
||||
ns->socket = socket(address->sa_family, SOCK_DGRAM, 0);
|
||||
if (ns->socket < 0) { err = 1; goto out1; }
|
||||
evutil_make_socket_closeonexec(ns->socket);
|
||||
evutil_make_socket_nonblocking(ns->socket);
|
||||
|
Loading…
x
Reference in New Issue
Block a user