lock the links_with_work list when processing flow
This closes
@@ -309,11 +309,16 @@ static void qdr_link_flow_CT(qdr_core_t *core, qdr_action_t *action, bool discar
//
if (link->stalled_outbound) {
link->stalled_outbound = false;
+
+ sys_mutex_lock(link->conn->work_lock);
+
if (DEQ_SIZE(link->undelivered) > 0) {
// Adding this work at priority 0.
qdr_add_link_ref(link->conn->links_with_work, link, QDR_LINK_LIST_CLASS_WORK);
activate = true;
}
+
+ sys_mutex_unlock(link->conn->work_lock);
}
if (link->core_endpoint) {
