Commit b5f3fb7b authored by Marek Vavruša's avatar Marek Vavruša

layer/pktcache: treat all cache insert errors as errors

parent 71db340c
......@@ -205,7 +205,7 @@ static int stash(knot_layer_t *ctx, knot_pkt_t *pkt)
/* Stash answer in the cache */
int ret = kr_cache_insert(&txn, get_tag(pkt), qname, qtype, &header, data);
if (ret == KNOT_ESPACE) {
if (ret != 0) {
kr_cache_txn_abort(&txn);
} else {
DEBUG_MSG("=> answer cached for TTL=%u\n", ttl);
......
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