Small bugfix in checking complete requests async

This commit is contained in:
Willem Toorop 2016-04-11 15:33:08 +02:00
parent da577a463d
commit 57954ad41e
1 changed files with 4 additions and 3 deletions

View File

@ -1455,11 +1455,12 @@ upstream_read_cb(void *userarg)
/* This also reschedules events for the upstream*/ /* This also reschedules events for the upstream*/
stub_cleanup(netreq); stub_cleanup(netreq);
if (netreq->owner->is_sync_request) if (!upstream->is_sync_loop || netreq->owner->is_sync_request)
_getdns_check_dns_req_complete(netreq->owner); _getdns_check_dns_req_complete(netreq->owner);
else if (upstream->is_sync_loop && else {
!netreq->owner->is_sync_request) { assert(upstream->is_sync_loop &&
!netreq->owner->is_sync_request);
/* We have a result for an asynchronously scheduled /* We have a result for an asynchronously scheduled
* netreq, while processing the synchronous loop. * netreq, while processing the synchronous loop.