···600600 (* try backfill from buffer first *)
601601 let ring = Bus.ring_after cursor in
602602 let ring_covers =
603603- match List.rev ring with
603603+ match ring with
604604 | [] ->
605605 false
606606- | last :: _ ->
607607- last.seq >= cutoff
606606+ | first :: _ -> (
607607+ match List.rev ring with
608608+ | [] ->
609609+ false
610610+ | last :: _ ->
611611+ (* ring covers if it goes from <= cursor all the way to >= cutoff *)
612612+ first.seq <= cursor && last.seq >= cutoff )
608613 in
609614 ( if ring_covers then
610615 Lwt_list.iter_s (fun (it : Bus.item) -> send it.bytes) ring