diff options
author | Marek Vavruša <mvavrusa@cloudflare.com> | 2017-11-28 18:50:15 +0100 |
---|---|---|
committer | Marek Vavruša <mvavrusa@cloudflare.com> | 2017-12-21 07:32:56 +0100 |
commit | 875e02b2681ee02c84e939f05831cb19f4d46534 (patch) | |
tree | 807f18af2b40fe0b723b8eb4a3ef89b9459ecdd2 /daemon/main.c | |
parent | ci: added lua-http dependency to build, fixed test for http (diff) | |
download | knot-resolver-875e02b2681ee02c84e939f05831cb19f4d46534.tar.xz knot-resolver-875e02b2681ee02c84e939f05831cb19f4d46534.zip |
main: close loop after it's finished to please valgrind
also disabled priming and TA signalisation during tests
Diffstat (limited to 'daemon/main.c')
-rw-r--r-- | daemon/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/main.c b/daemon/main.c index 276f0fb7..5c25e4cd 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -436,6 +436,7 @@ int main(int argc, char **argv) char *moduledir = MODULEDIR; const char *config = NULL; int control_fd = -1; + uv_loop_t *loop = NULL; /* Long options. */ int c = 0, li = 0, ret = 0; @@ -656,7 +657,7 @@ int main(int argc, char **argv) engine_set_moduledir(&engine, moduledir); /* Block signals. */ - uv_loop_t *loop = uv_default_loop(); + loop = uv_default_loop(); uv_signal_t sigint, sigterm; uv_signal_init(loop, &sigint); uv_signal_init(loop, &sigterm); @@ -766,6 +767,9 @@ int main(int argc, char **argv) cleanup:/* Cleanup. */ engine_deinit(&engine); worker_reclaim(worker); + if (loop != NULL) { + uv_loop_close(loop); + } mp_delete(pool.ctx); array_clear(addr_set); array_clear(tls_set); |