Browse Source

rename to SYNC_TIMEOUT

merge-requests/195/head
Jonathan de Jong 4 years ago
parent
commit
6a0834babc
  1. 4
      src/client_server/sync.rs

4
src/client_server/sync.rs

@ -175,7 +175,7 @@ async fn sync_helper_wrapper( @@ -175,7 +175,7 @@ async fn sync_helper_wrapper(
let _ = tx.send(Some(r.map(|(r, _)| r.into())));
}
const THIRTY_SECONDS: Duration = Duration::from_secs(30);
const SYNC_TIMEOUT: Duration = Duration::from_secs(30);
#[tracing::instrument(skip(db))]
async fn sync_helper(
@ -212,7 +212,7 @@ async fn sync_helper( @@ -212,7 +212,7 @@ async fn sync_helper(
&& response.device_one_time_keys_count.is_empty()
{
// ...we wait until we get new data, or until timeout.
if tokio::time::timeout(timeout.unwrap_or_default().min(THIRTY_SECONDS), watcher)
if tokio::time::timeout(timeout.unwrap_or_default().min(SYNC_TIMEOUT), watcher)
.await
.is_ok()
// But if we get new data (is_err is timeout)...

Loading…
Cancel
Save