Ensure QCC tasklet is woken up when a QCS is inserted in the purge list.
The objective is to prevent keeping QCS for too long in it.
Changes are only necessary when running outside of QCC tasklet. Thus new
wakeup are only inserted in receive handlers to avoid unnecessary
tasklet execution.
Prior to this patch, a purgeable QCS could have been kept virtually
indefinitely. This probably did not really happen as QCC tasklet is
frequently woken after frames handling.
This should be backported up to 3.2, after a period of observation.
return 0;
}
+ /* Wakeup tasklet if QCS inserted in purge list. May happen after remote closure. */
+ if (qcs_is_completed(qcs))
+ tasklet_wakeup(qcc->wait_event.tasklet);
+
out:
TRACE_LEAVE(QMUX_EV_QCC_RECV, qcc->conn);
return 0;
qcs->flags |= QC_SF_SIZE_KNOWN|QC_SF_RECV_RESET;
qcs_close_remote(qcs);
+ /* Wakeup tasklet if QCS inserted in purge list. May happen after remote closure. */
+ if (qcs_is_completed(qcs))
+ tasklet_wakeup(qcc->wait_event.tasklet);
/* RFC 9000 3.2. Receiving Stream States
*