From 641d11a19b7427ce94cbc89a6e0aa33e9c0278ca Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 24 Jan 2023 10:09:12 -0800 Subject: [PATCH] remove excess continues --- web3_proxy/src/rpcs/connections.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/web3_proxy/src/rpcs/connections.rs b/web3_proxy/src/rpcs/connections.rs index 2c573dd4..24e4e856 100644 --- a/web3_proxy/src/rpcs/connections.rs +++ b/web3_proxy/src/rpcs/connections.rs @@ -897,9 +897,10 @@ impl Web3Connections { request_metadata.no_servers.fetch_add(1, Ordering::Release); } + // TODO: if there are other servers in synced_connections, we should continue now + if let Some(watch_consensus_connections) = watch_consensus_connections.as_mut() { - // TODO: if there are other servers in synced_connections, we should continue now // wait until retry_at OR synced_connections changes trace!("waiting for change in synced servers or retry_at"); tokio::select! { @@ -911,10 +912,8 @@ impl Web3Connections { let _ = watch_consensus_connections.borrow_and_update(); } } - continue; } else { sleep_until(retry_at).await; - continue; } } OpenRequestResult::NotReady => { @@ -929,9 +928,6 @@ impl Web3Connections { .subscribe() .changed() .await?; - } else { - // TODO: continue or break? - continue; } } }