mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-11 05:14:46 -04:00
Avoid double-invocation of user callback with EVUTIL_EAI_CANCEL
This commit is contained in:
parent
494186129f
commit
abf01ed13a
5
evdns.c
5
evdns.c
@ -4248,6 +4248,11 @@ evdns_getaddrinfo_gotresolve(int result, char type, int count,
|
|||||||
free_getaddrinfo_request(data);
|
free_getaddrinfo_request(data);
|
||||||
return;
|
return;
|
||||||
} else if (data->user_canceled) {
|
} 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);
|
data->user_cb(EVUTIL_EAI_CANCEL, NULL, data->user_data);
|
||||||
free_getaddrinfo_request(data);
|
free_getaddrinfo_request(data);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user