diff --git a/aw-client-rust/src/blocking.rs b/aw-client-rust/src/blocking.rs index 6a688ee4..ee7822bc 100644 --- a/aw-client-rust/src/blocking.rs +++ b/aw-client-rust/src/blocking.rs @@ -80,7 +80,7 @@ impl AwClient { proxy_method!(get_event_count, i64, bucketname: &str); proxy_method!(get_info, aw_models::Info,); - pub fn wait_for_server(&self) -> Result<(), Box> { - self.client.wait_for_server() + pub fn wait_for_start(&self) -> Result<(), Box> { + self.client.wait_for_start() } } diff --git a/aw-client-rust/src/lib.rs b/aw-client-rust/src/lib.rs index c481f67a..0306aee0 100644 --- a/aw-client-rust/src/lib.rs +++ b/aw-client-rust/src/lib.rs @@ -225,7 +225,7 @@ impl AwClient { } // TODO: make async - pub fn wait_for_server(&self) -> Result<(), Box> { + pub fn wait_for_start(&self) -> Result<(), Box> { let socket_addrs = self.baseurl.socket_addrs(|| None)?; let socket_addr = socket_addrs.first() .ok_or("Unable to resolve baseurl into socket address")?; diff --git a/aw-sync/src/sync_wrapper.rs b/aw-sync/src/sync_wrapper.rs index 49c1ae85..13007779 100644 --- a/aw-sync/src/sync_wrapper.rs +++ b/aw-sync/src/sync_wrapper.rs @@ -1,7 +1,5 @@ use std::error::Error; use std::fs; -use std::net::TcpStream; -use std::time::Duration; use crate::sync::{sync_run, SyncMode, SyncSpec}; use aw_client_rust::blocking::AwClient; @@ -15,7 +13,7 @@ pub fn pull_all(client: &AwClient) -> Result<(), Box> { } pub fn pull(host: &str, client: &AwClient) -> Result<(), Box> { - client.wait_for_server()?; + client.wait_for_start()?; // Path to the sync folder // Sync folder is structured ./{hostname}/{device_id}/test.db