fix: potential infinite `setTimeout(flush` loop

Happens if a channel gets closed while its buffer array
(e.g. `r2cSchedule`) is not empty.
1 job for fix-infinite-flush-loop in 26 seconds