mirror of https://github.com/getdnsapi/getdns.git
Call cancel callbacks only when callback exists
This commit is contained in:
parent
6ed3d77523
commit
7e9956b19e
|
@ -3275,9 +3275,11 @@ _getdns_context_request_timed_out(getdns_dns_req *req)
|
||||||
|
|
||||||
/* cancel the req - also clears it from outbound and cleans up*/
|
/* cancel the req - also clears it from outbound and cleans up*/
|
||||||
_getdns_context_cancel_request(context, trans_id, 0);
|
_getdns_context_cancel_request(context, trans_id, 0);
|
||||||
|
if (cb) {
|
||||||
context->processing = 1;
|
context->processing = 1;
|
||||||
cb(context, GETDNS_CALLBACK_TIMEOUT, response, user_arg, trans_id);
|
cb(context, GETDNS_CALLBACK_TIMEOUT, response, user_arg, trans_id);
|
||||||
context->processing = 0;
|
context->processing = 0;
|
||||||
|
}
|
||||||
getdns_context_request_count_changed(context);
|
getdns_context_request_count_changed(context);
|
||||||
return GETDNS_RETURN_GOOD;
|
return GETDNS_RETURN_GOOD;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue