Additional fix to regression introduced in a previous checkin for this fix. Add the out_link to links_with_work only on new work creation
@@ -200,8 +200,9 @@ void qdr_forward_deliver_CT(qdr_core_t *core, qdr_link_t *out_link, qdr_delivery
work->work_type = QDR_LINK_WORK_DELIVERY;
work->value = 1;
DEQ_INSERT_TAIL(out_link->work_list, work);
- }
qdr_add_link_ref(&out_link->conn->links_with_work, out_link, QDR_LINK_LIST_CLASS_WORK);
+ }
+
out_dlv->link_work = work;
sys_mutex_unlock(out_link->conn->work_lock);
