From 68520e91d436be0df3cde00db33a425c1ee2ac28 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Mon, 6 Oct 2014 15:11:03 +0200 Subject: [PATCH] Return empty reponse on timeouts with async too --- src/context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/context.c b/src/context.c index 0c495956..16667bb4 100755 --- a/src/context.c +++ b/src/context.c @@ -1767,11 +1767,12 @@ getdns_context_request_timed_out(struct getdns_dns_req getdns_transaction_t trans_id = req->trans_id; getdns_callback_t cb = req->user_callback; void *user_arg = req->user_pointer; + getdns_dict *response = create_getdns_response(req); /* cancel the req - also clears it from outbound and cleans up*/ getdns_context_cancel_request(context, trans_id, 0); 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; if (context->extension) { context->extension->request_count_changed(context,