Avoid double-invocation of user callback with EVUTIL_EAI_CANCEL

This commit is contained in:
Nick Mathewson 2010-11-19 11:33:48 -05:00
parent 494186129f
commit abf01ed13a

View File

@ -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;