diff --git a/evdns.c b/evdns.c index 25857a38..e13dbbf5 100644 --- a/evdns.c +++ b/evdns.c @@ -4248,6 +4248,11 @@ evdns_getaddrinfo_gotresolve(int result, char type, int count, free_getaddrinfo_request(data); return; } else if (data->user_canceled) { + if (other_req->r) { + /* The other request is still working; let it + * hit the callback and report the failure. */ + return; + } data->user_cb(EVUTIL_EAI_CANCEL, NULL, data->user_data); free_getaddrinfo_request(data); return;