From 339e4f70499b5d686924e4924086b75442fe2fe6 Mon Sep 17 00:00:00 2001 From: saradickinson Date: Thu, 23 Oct 2014 08:42:15 +0000 Subject: [PATCH] Fixing async test --- src/test/tests_stub_async.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/test/tests_stub_async.c b/src/test/tests_stub_async.c index a6e6fce2..4c6e0b4a 100755 --- a/src/test/tests_stub_async.c +++ b/src/test/tests_stub_async.c @@ -121,19 +121,7 @@ main(int argc, char** argv) return (GETDNS_RETURN_GENERIC_ERROR); } else { - /* Call the event loop */ - struct timeval tv; - while (getdns_context_get_num_pending_requests(this_context, &tv) > 0) { - int fd = getdns_context_fd(this_context); - fd_set read_fds; - FD_ZERO(&read_fds); - FD_SET(fd, &read_fds); - select(fd + 1, &read_fds, NULL, NULL, &tv); - if (getdns_context_process_async(this_context) != GETDNS_RETURN_GOOD) { - // context destroyed - break; - } - } + getdns_context_run(this_context); } /* Clean up */ getdns_context_destroy(this_context);