Skip to content
Snippets Groups Projects
Commit d44c68a2 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

lib/resolve: count early finished requests as done

this fixes stats for canceled/blocked or forwarded queries without
started name resolution
parent 53fc3573
Branches
Tags
No related merge requests found
......@@ -369,8 +369,11 @@ int kr_resolve_query(struct kr_request *request, const knot_dname_t *qname, uint
knot_wire_set_ra(answer->wire);
knot_wire_set_rcode(answer->wire, KNOT_RCODE_NOERROR);
/* Expect answer */
/* Expect answer, pop if satisfied immediately */
ITERATE_LAYERS(request, begin, request);
if (request->state == KNOT_STATE_DONE) {
kr_rplan_pop(rplan, qry);
}
return request->state;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment