Commit 8181c2ce authored by Nils Goroll's avatar Nils Goroll

fini the T_NEXUS during node_free

it's too early in set_delivered() because set_closed() calls
set_delivered() on a nexus when all children are already devivered, but
that can happen from within the nexus node's fsm.

we will add extra finis when it's safe in a later commit
parent 556daaf5
......@@ -493,7 +493,13 @@ node_free(struct req *req, struct node *node)
fini_data(req, node);
break;
case T_CRC:
break;
case T_NEXUS:
if (node->req == NULL || node->parent == NULL)
break;
// XXX SHOULD HAPPEN EARLIER
req_fini(node->req, req->wrk);
node->req = NULL;
break;
default:
INCOMPL();
......@@ -706,11 +712,8 @@ set_delivered(struct bytes_tree *tree, struct node *node)
}
CHECK_OBJ_NOTNULL(node->req, REQ_MAGIC);
if (node->parent != NULL) {
if (node->parent != NULL)
VDP_close(node->req);
req_fini(node->req, req->wrk);
node->req = NULL;
}
}
node->state = ST_DELIVERED;
......
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