diff --git a/libunbound/context.c b/libunbound/context.c index 95e6a8e7f..6ac8086bf 100644 --- a/libunbound/context.c +++ b/libunbound/context.c @@ -142,7 +142,7 @@ context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass, } lock_basic_unlock(&ctx->cfglock); q->node.key = &q->querynum; - q->async = (cb != NULL && cb_event != NULL); + q->async = (cb != NULL || cb_event != NULL); q->cb = cb; q->cb_event = cb_event; q->cb_arg = cbarg;