Use the right lock for signalling subreq.done

This looks like a trivial oversight in 3370a4c4,
which was meant to fix #10: We need to use the corresponding lock to signal
when a subreq node is done.

Hopefully fixes #13
parent 8b2175b8
......@@ -232,11 +232,11 @@ vped_task(struct worker *wrk, void *priv)
break;
case T_SUBREQ:
assert(pesi == req->transport_priv);
Lck_Lock(&pesi_tasks->bytes_tree->tree_lock);
Lck_Lock(node->subreq.shared_lock);
task_fini(pesi_tasks, pesi);
node->subreq.done = 1;
AZ(pthread_cond_signal(&node->subreq.cond));
Lck_Unlock(&pesi_tasks->bytes_tree->tree_lock);
Lck_Unlock(node->subreq.shared_lock);
break;
case T_NEXUS:
assert(node->nexus.req == req);
......
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