Unverified Commit 3445eeba authored by Robert Klotzner's avatar Robert Klotzner Committed by GitHub
Browse files

Fix busy loops. (#3392)

parent 16f646dc
Pipeline #145018 passed with stages
in 31 minutes and 58 seconds
......@@ -806,8 +806,8 @@ impl AvailabilityRecoverySubsystem {
}
}
}
output = state.interactions.next() => {
if let Some((candidate_hash, result)) = output.flatten() {
output = state.interactions.select_next_some() => {
if let Some((candidate_hash, result)) = output {
state.availability_lru.put(candidate_hash, result);
}
}
......
......@@ -1138,12 +1138,10 @@ pub(crate) async fn run<Context>(
_ = next_inactivity_stream.next() => {
disconnect_inactive_peers(&mut ctx, &eviction_policy, &state.peer_data).await;
}
res = state.collation_fetches.next() => {
if let Some(res) = res {
res = state.collation_fetches.select_next_some() => {
handle_collation_fetched_result(&mut ctx, &mut state, res).await;
}
}
}
let mut retained_requested = HashSet::new();
for (pending_collation, per_req) in state.requested_collations.iter_mut() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment