Commit 5e73af5d authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Petr Špaček

cache.clear('name'): fix a small GC race

Thanks to Marek for noticing it.
parent 4d91c80a
Pipeline #41808 passed with stages
in 46 minutes and 50 seconds
......@@ -184,13 +184,13 @@ cache.clear = function (name, exact_name, rr_type, chunk_size, callback, prev_st
local ret = ffi.C.kr_cache_closest_apex(cach, dname, false, apex_array)
if ret < 0 then
error(ffi.string(ffi.C.knot_strerror(ret))) end
if not ffi.C.knot_dname_is_equal(apex_array[0], dname) then
local apex_str = kres.dname2str(apex_array[0])
rettable.not_apex = 'to clear proofs of non-existence call '
.. 'cache.clear(\'' .. tostring(apex_str) ..'\')'
rettable.subtree = apex_str
if rr_type ~= nil then
Markdown is supported
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