diff --git a/rustfs/src/main.rs b/rustfs/src/main.rs index 8b4eadd8..9ec274c9 100644 --- a/rustfs/src/main.rs +++ b/rustfs/src/main.rs @@ -136,6 +136,9 @@ async fn run(opt: config::Opt) -> Result<()> { set_global_addr(&opt.address).await; + // Wait for DNS initialization to complete before network-heavy operations + dns_init.await.map_err(Error::other)?; + // For RPC let (endpoint_pools, setup_type) = EndpointServerPools::from_volumes(server_address.clone().as_str(), opt.volumes.clone()) .await @@ -230,9 +233,6 @@ async fn run(opt: config::Opt) -> Result<()> { // Initialize event notifier init_event_notifier().await; - // Wait for DNS initialization to complete before network-heavy operations - dns_init.await.map_err(Error::other)?; - let buckets_list = store .list_bucket(&BucketOptions { no_metadata: true, diff --git a/rustfs/src/server/http.rs b/rustfs/src/server/http.rs index 4bf5da34..2cfeed6f 100644 --- a/rustfs/src/server/http.rs +++ b/rustfs/src/server/http.rs @@ -128,7 +128,6 @@ pub async fn start_http_server( ) -> Result> { let server_addr = parse_and_resolve_address(opt.address.as_str()).map_err(Error::other)?; let server_port = server_addr.port(); - let _server_address = server_addr.to_string(); // The listening address and port are obtained from the parameters let listener = {