This commit is contained in:
Jon Häggblad
2023-01-16 13:40:14 +01:00
parent e924a4e869
commit 14a3186c8a
2 changed files with 7 additions and 8 deletions
@@ -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
+2
View File
@@ -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();