summaryrefslogtreecommitdiff
path: root/libunbound/libworker.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2018-05-12 11:55:17 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2018-05-12 11:55:17 +0000
commita6c5280ea59f940be13fd6eb0f94ab8360d3d6c9 (patch)
treecbe088761a83cf2025bbdf36e1574f38c3e988f5 /libunbound/libworker.c
parent8c2647a7dc721c8e5349bd194b8e8e178412057e (diff)
Notes
Diffstat (limited to 'libunbound/libworker.c')
-rw-r--r--libunbound/libworker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libunbound/libworker.c b/libunbound/libworker.c
index b42ba0bd8e78..f6a1d1d1c47b 100644
--- a/libunbound/libworker.c
+++ b/libunbound/libworker.c
@@ -294,6 +294,7 @@ libworker_do_cmd(struct libworker* w, uint8_t* msg, uint32_t len)
log_err("unknown command for bg worker %d",
(int)context_serial_getcmd(msg, len));
/* and fall through to quit */
+ /* fallthrough */
case UB_LIBCMD_QUIT:
free(msg);
comm_base_exit(w->base);
@@ -749,7 +750,7 @@ libworker_bg_done_cb(void* arg, int rcode, sldns_buffer* buf, enum sec_status s,
{
struct ctx_query* q = (struct ctx_query*)arg;
- if(q->cancelled) {
+ if(q->cancelled || q->w->back->want_to_quit) {
if(q->w->is_bg_thread) {
/* delete it now */
struct ub_ctx* ctx = q->w->ctx;