From 14a3186c8a0e53dc3d00c9d8b25d401ca059100c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Mon, 16 Jan 2023 13:40:14 +0100 Subject: [PATCH] wip --- common/client-libs/mixnet-client/src/client.rs | 13 +++++-------- gateway/src/node/mod.rs | 2 ++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/common/client-libs/mixnet-client/src/client.rs b/common/client-libs/mixnet-client/src/client.rs index f3a04f1099..416e984567 100644 --- a/common/client-libs/mixnet-client/src/client.rs +++ b/common/client-libs/mixnet-client/src/client.rs @@ -93,23 +93,20 @@ impl Client { let conn = match tokio::time::timeout(connection_timeout, connection_fut).await { Ok(stream_res) => match stream_res { Ok(stream) => { - debug!("Managed to establish connection to {}", address); + debug!("Managed to establish connection to {address}"); // if we managed to connect, reset the reconnection count (whatever it might have been) current_reconnection.store(0, Ordering::Release); Framed::new(stream, SphinxCodec) } Err(err) => { - debug!( - "failed to establish connection to {} (err: {})", - address, err - ); + debug!("failed to establish connection to {address} (err: {err})"); return; } }, - Err(_) => { + Err(_err) => { debug!( - "failed to connect to {} within {:?}", - address, connection_timeout + "failed to connect to {address} within {:?}", + connection_timeout ); // we failed to connect - increase reconnection attempt diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index cc04b6a7c1..f0658503e5 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -333,6 +333,8 @@ where .map_err(|source| GatewayError::CoconutVerifierCreationFailure { source })? }; + // The packet forwarder just forwards packets onto the mixnet. When unable to send it will + // just drop the packet and assume that the originator will try to retransmit let mix_forwarding_channel = self.start_packet_forwarder(shutdown.subscribe()); let active_clients_store = ActiveClientsStore::new();