.sat();
if let Some(req) = {
+ let now = Instant::now();
+
if ! downbound.is_empty() {
outstanding.pop_front()
} else if let Some((i,_)) = outstanding.iter().enumerate().find({
- |(_,o)| outstanding.len() > o.oi.target_requests_outstanding.sat()
- // xxx need timeout-based return too
+ |(_,o)| {
+ outstanding.len() > o.oi.target_requests_outstanding.sat()
+ ||
+ o.oi.deadline < now
+ }
}) {
Some(outstanding.remove(i).unwrap())
} else {
while downbound.total_len() > max {
let _ = downbound.pop_front();
+ trace!("{} discarding downbound-queue-full", &ic.link);
}
select!{