diff --git a/src/cmd/src/metasrv.rs b/src/cmd/src/metasrv.rs index 06673e05afa1..6af4e599e08f 100644 --- a/src/cmd/src/metasrv.rs +++ b/src/cmd/src/metasrv.rs @@ -272,9 +272,7 @@ impl StartCommand { info!("Metasrv options: {:#?}", opts); let plugin_opts = opts.plugins; - #[allow(unused_mut)] let mut opts = opts.component; - #[cfg(not(target_os = "android"))] opts.detect_server_addr(); let mut plugins = Plugins::new(); plugins::setup_metasrv_plugins(&mut plugins, &plugin_opts, &opts) diff --git a/src/meta-srv/src/metasrv.rs b/src/meta-srv/src/metasrv.rs index 092b6a33598b..098f0cb85b45 100644 --- a/src/meta-srv/src/metasrv.rs +++ b/src/meta-srv/src/metasrv.rs @@ -228,7 +228,7 @@ impl MetasrvOptions { } #[cfg(target_os = "android")] - pub fn detect_hostname(&mut self) { + pub fn detect_server_addr(&mut self) { if self.server_addr.is_empty() { common_telemetry::debug!("detect local IP is not supported on Android"); }