Return empty reponse on timeouts with async too

This commit is contained in:
Willem Toorop 2014-10-06 15:11:03 +02:00
parent 332f34b3f5
commit 68520e91d4
1 changed files with 2 additions and 1 deletions

View File

@ -1767,11 +1767,12 @@ getdns_context_request_timed_out(struct getdns_dns_req
getdns_transaction_t trans_id = req->trans_id; getdns_transaction_t trans_id = req->trans_id;
getdns_callback_t cb = req->user_callback; getdns_callback_t cb = req->user_callback;
void *user_arg = req->user_pointer; void *user_arg = req->user_pointer;
getdns_dict *response = create_getdns_response(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);
context->processing = 1; context->processing = 1;
cb(context, GETDNS_CALLBACK_TIMEOUT, NULL, user_arg, trans_id); cb(context, GETDNS_CALLBACK_TIMEOUT, response, user_arg, trans_id);
context->processing = 0; context->processing = 0;
if (context->extension) { if (context->extension) {
context->extension->request_count_changed(context, context->extension->request_count_changed(context,