mirror of
https://github.com/moparisthebest/curl
synced 2024-11-14 13:35:03 -05:00
Curl_is_resolved(): FD_ZERO the file descriptors before we call ares_fds().
Problem tracked down by Bjorn Reese.
This commit is contained in:
parent
d4ab68cd51
commit
c1f31180a2
@ -400,7 +400,11 @@ CURLcode Curl_is_resolved(struct connectdata *conn, bool *done)
|
|||||||
static const struct timeval tv={0,0};
|
static const struct timeval tv={0,0};
|
||||||
int count;
|
int count;
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
int nfds = ares_fds(data->state.areschannel, &read_fds, &write_fds);
|
int nfds;
|
||||||
|
|
||||||
|
FD_ZERO(&read_fds);
|
||||||
|
FD_ZERO(&write_fds);
|
||||||
|
nfds = ares_fds(data->state.areschannel, &read_fds, &write_fds);
|
||||||
|
|
||||||
count = select(nfds, &read_fds, &write_fds, NULL,
|
count = select(nfds, &read_fds, &write_fds, NULL,
|
||||||
(struct timeval *)&tv);
|
(struct timeval *)&tv);
|
||||||
|
Loading…
Reference in New Issue
Block a user