From 261b15310707b57f53976522a789221e40b20fef Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 14 May 2024 17:40:32 +0200 Subject: [PATCH] fmt --- integration-tests/zombienet/src/lib.rs | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/integration-tests/zombienet/src/lib.rs b/integration-tests/zombienet/src/lib.rs index 857a111e56..9e69cc0a73 100644 --- a/integration-tests/zombienet/src/lib.rs +++ b/integration-tests/zombienet/src/lib.rs @@ -48,23 +48,23 @@ pub async fn wait_subxt_client( ) -> Result, anyhow::Error> { log::trace!("trying to connect to: {}", node.ws_uri()); loop { - match node.client::().await { - Ok(cli) => { - log::trace!("returning client for: {}", node.ws_uri()); - return Ok(cli); - }, - Err(e) => { - log::trace!("{e:?}"); - if let subxt::Error::Rpc(subxt::error::RpcError::ClientError(ref inner)) = e { - log::trace!("inner: {inner}"); - if inner.to_string().contains("i/o error") { - // The node is not ready to accept connections yet - tokio::time::sleep(std::time::Duration::from_secs(1)).await; - continue; - } + match node.client::().await { + Ok(cli) => { + log::trace!("returning client for: {}", node.ws_uri()); + return Ok(cli); + }, + Err(e) => { + log::trace!("{e:?}"); + if let subxt::Error::Rpc(subxt::error::RpcError::ClientError(ref inner)) = e { + log::trace!("inner: {inner}"); + if inner.to_string().contains("i/o error") { + // The node is not ready to accept connections yet + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + continue; } - return Err(anyhow!("Cannot connect to node : {e:?}")); - }, - }; + } + return Err(anyhow!("Cannot connect to node : {e:?}")); + }, + }; } }