diff --git a/src/client.rs b/src/client.rs index 0426d8c..4119e8a 100644 --- a/src/client.rs +++ b/src/client.rs @@ -176,8 +176,8 @@ async fn do_data_channel_handshake( .await .with_context(|| "Failed to connect to remote_addr")?) }, - |e, _| { - warn!("{:?}", e); + |e, duration| { + warn!("{:?}. Retry in {:?}", e, duration); }, ) .await?; diff --git a/src/server.rs b/src/server.rs index 61bc083..12558d3 100644 --- a/src/server.rs +++ b/src/server.rs @@ -507,8 +507,8 @@ fn tcp_listen_and_send( // FIXME: Respect shutdown signal let l = backoff::future::retry_notify(listen_backoff(), || async { Ok(TcpListener::bind(&addr).await?) - }, |e, _| { - error!("{:?}", e); + }, |e, duration| { + error!("{:?}. Retry in {:?}", e, duration); }) .await .with_context(|| "Failed to listen for the service"); @@ -618,8 +618,8 @@ async fn run_udp_connection_pool( .await .with_context(|| "Failed to listen for the service")?) }, - |e, _| { - warn!("{:?}", e); + |e, duration| { + warn!("{:?}. Retry in {:?}", e, duration); }, ) .await