diff --git a/Cargo.toml b/Cargo.toml index 6199a2d2bc..b2134edb40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,4 +40,4 @@ missing_debug_implementations = "warn" unexpected_cfgs = { level = "warn", check-cfg = ["cfg(iroh_docsrs)"] } [workspace.lints.clippy] -unused-async = "warn" \ No newline at end of file +unused-async = "warn" diff --git a/iroh-relay/Cargo.toml b/iroh-relay/Cargo.toml index 62b722b27e..a2fa5e9980 100644 --- a/iroh-relay/Cargo.toml +++ b/iroh-relay/Cargo.toml @@ -141,4 +141,4 @@ required-features = ["server"] [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "iroh_docsrs"] \ No newline at end of file +rustdoc-args = ["--cfg", "iroh_docsrs"] diff --git a/iroh-relay/src/main.rs b/iroh-relay/src/main.rs index 481bca569f..7150fd95d5 100644 --- a/iroh-relay/src/main.rs +++ b/iroh-relay/src/main.rs @@ -479,7 +479,7 @@ async fn maybe_load_tls( let cert_path = tls.cert_path(); let key_path = tls.key_path(); - let interval = std::time::Duration::from_secs(relay::DEFAULT_CERT_RELOAD_INTERVAL); + let interval = relay::DEFAULT_CERT_RELOAD_INTERVAL; let key_reader = rustls_cert_file_reader::FileReader::new( key_path, diff --git a/iroh-relay/src/server/resolver.rs b/iroh-relay/src/server/resolver.rs index 18cecaf1e3..f4e9b8f2bc 100644 --- a/iroh-relay/src/server/resolver.rs +++ b/iroh-relay/src/server/resolver.rs @@ -9,7 +9,7 @@ use rustls::{ use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle}; /// The default certificate reload interval. -pub const DEFAULT_CERT_RELOAD_INTERVAL: u64 = 60 * 60 * 24; +pub const DEFAULT_CERT_RELOAD_INTERVAL: Duration = Duration::from_secs(60 * 60 * 24); /// A Certificate resolver that reloads the certificate every interval #[derive(Debug)]